• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic