• 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

html:hidden

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My form bean having the property "userid=442" is in the request from an action class(UserAction.java). I want to use this property's value for the value of the hidden form field in the jsp page(UserForm.jsp). I am using
<html:hidden name="userForm" property="userId" value="userId"/>
but I am not getting the userid=442 in my action class(UserAction.java) when I submit this jsp form. Any fix?? Guess my usage of html:hidden is incorrect...
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts HTML taglib reference

Assuming you have an <html:form> tag, you do not require the name attribute. You would only need name if you do not have an associated <html:form>. If that's the case, the only rquired attribute is property. The value attribute should not be required. Try this:

<html:hidden property="userId"/>
reply
    Bookmark Topic Watch Topic
  • New Topic