• Post Reply Bookmark Topic Watch Topic
  • New Topic

html:hidden  RSS feed

 
Nicolas Flammel
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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...
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • 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"/>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!