IntelliJ Java IDE
The moose likes Struts and the fly likes html:hidden Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "html:hidden" Watch "html:hidden" New topic
Author

html:hidden

Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
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

Joined: Nov 09, 2000
Posts: 6450
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"/>


Jason's Blog
 
 
subject: html:hidden
 
Threads others viewed
Struts Form Values are null
Jboss 6 + Jsp +Struts
IllegalArgumentException
html:hidden
how to code for checkboxes on forms?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture