This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: According to TLD, tag html:hidden must be empty, but is not

 
Saathvik Reddy
Ranch Hand
Posts: 228
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using <html:hidden> tag

<html:hidden property="method" value="search"/>
<html:hidden property="param1"><bean:write name="param1"/></html:hidden>

Error i get is:

According to TLD, tag html:hidden must be empty, but is not
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1768)

Please help me out with this
Thanks,
 
Stefan Evans
Bartender
Posts: 1640
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is fairly self explanatory.
You can't specify the value of an html:hidden component by nesting a String value. They didn't allow for that.

You will just have to use the value attribute and a runtime expression. either <%= expr %> or If you have a JSP2.0 container then an EL ${expr}

<html:hidden property="param1" value="${param1}"/>
or
<html:hidden property="param1" value="<%= pageContext.findAttribute("param1") %>"/>

you might have to convert/cast the value to a String in the <%= expr %> to be a string.
Cheers,
evnafets
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic