File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 60062
    
  65

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I call JavaBean set methods from jsp?
 
Similar Threads
Scriptless page.
Doubt in c:set tag
Remove and Set
Headfirst Servlets and Jsp <c:set> pg.457
[JSTL] how can I convert values (string to int) in JSTL