This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 61310
    
  66

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]
 
GeeCON Prague 2014
 
subject: How do I call JavaBean set methods from jsp?