-----Original Message----- From: Damm, Gary [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 10:31 AM To: Struts Users Mailing List Subject: RE: form scope
gary wrote: Try setting the form scope in your struts-config to request. I believe by default it is set to session. When I set the scope to request that is when I get the problem -- see original message. Subject: form scope OK, yea it appears from some of the responses that there is some confusion, I am doing something that is really simple. Here is the form from the jsp -- dropdown.jsp: <html:form action = DropDownAction" name = "dropDownFormBean" type = "somePath.DropDownFormBean"> <html:select property = "customer"> <html:option value = "custOne"> cust one</html:option> <html:option value = "custTwo"> cust two</html:option> </html:select> <html:submit/> </html:form> NOW on this same page I can write a scriptlet that retrieves the form bean from the request and outputs the correct value For customer. (form bean is in request scope/object and properly populated) Here is the action-mapping from struts-config.xml <action path = "/DropDownAction" type="somePath.DropDownAction" name"dropDownFormBean" scope="request" validate="false" > <forward name = "success" path="/dropdown.jsp" /> (the same page the form is on) </action> Now when the scope to set to session, and the form is submitted, the option is correctly set to the last entry. When the scope is set to request and the form is submitted , the option is not set to the last entry. We come from the land of the ice and snow With the midnight sun, where the hot springs glow The hammer of the gods, will drive our ships to new lands Fight the horde, Sing and cry Valhalla I am coming -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>