* Bjørn T Johansen ([EMAIL PROTECTED]) wrote: > I need to access the form from my jsp page, but I can't seem to find a > way to do this.. I need a name of the form to access but what is the > name of the form instance that Struts generate? If I have a form named > LoginForm does Struts make an instance called loginForm or does it > choose a random name or?
You specify the name when you declare a form bean in struts-config.xml in example: <form-bean name="LoginForm" type="com.company.forms.LoginForm" /> In the jsp you can define a variable to point to this form using: <bean:define id="myLoginForm" name="LoginForm" type="com.company.forms.LoginForm" /> you can then use myLoginForm in any scriptlet. You can also easily extract specific properties: <bean:define id="theUsername" name="LoginForm" property="username"/> or you can print them directly: <bean:write name="LoginForm" property="username"/> This is all from memory, so I hope it's correct. Hope this helps, Anders -- Anders Hermansen YoYo Mobile as --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]