The ActionForm is stored in the request with the same name as the
form-bean's name.  If you have a form bean:

    <form-bean name="loginForm"                                     type =
"project.struts.form.LoginForm" /> 

You can get the form in the JSP like this:

<%
project.struts.form.LoginForm myLoginForm = (project.struts.form.LoginForm)
request.getAttibute("loginForm");
%>

-Greg

-----Original Message-----
From: Wiebe de Jong [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 21, 2005 9:38 AM
To: 'Struts Users Mailing List'
Subject: RE: How to get form from JSP

The form is already defined as a bean. You can access it using the name you
gave it in your struts-config file.

i.e. <form-bean name="myForm" ...

Wiebe

-----Original Message-----
From: Billy Ng [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 9:16 AM
To: Struts Users Mailing List
Subject: How to get form from JSP

Hi all,

Is there a way to get the ActionForm obj in the JSP instead of using
<bean:define> tag

Thanks!

Billy 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to