aspose file tools*
The moose likes JSP and the fly likes How do I call JavaBean set methods from jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How do I call JavaBean set methods from jsp?" Watch "How do I call JavaBean set methods from jsp?" New topic
Author

How do I call JavaBean set methods from jsp?

Aaron Parker
Greenhorn

Joined: Jan 31, 2004
Posts: 27
I've tried c:set commands that look like this, but I get this error:


org.apache.jasper.JasperException: /strutsNewRSSFeed.jsp(66,8) According to TLD or attribute directive in tag file, attribute var does not accept any expressions

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

The message tells the tale. The var attibute cannot have a dynamic expression value.

There are two forms of <c:set>: one you use to set scoped vairables, one that you use to set a property of a bean that is a scoped variable.

The first format, sets a scoped variable:



The second format is used to set a property of a bean that is a scoped variable:



In the first format, the var attribute cannot be an expression


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: How do I call JavaBean set methods from jsp?