File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I call JavaBean set methods from jsp?

 
Aaron Parker
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic