I tried both the ways in the login.jsp


1 <html:form action="/Login" >

AND

2. <html:form action="/Login"
      name="LoginForm"
      type="com.xxx.yyy.LoginForm" >

Both the ways i got same response.

Any ideas about the placement of the LoginForm and LoginAction classes, as to where they have to be placed.

I placed them in the WEB-INF/classes/com/xxx/yyy/action where the package for both LoginForm and LoginAction classes is com.xxx.yyy.action

Regards,

Meka Toka




From: "Susan Bradeen" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: [newbie] Problem with Action Mapping
Date: Thu, 24 Jul 2003 08:55:12 -0400

On 07/24/2003 08:22:44 AM "struts user" wrote:

> Hi,
> I am new to Struts, i am facing the following a problem with the action
> mappings.
>
> Here are my code snippets related to mapping the action
>
> In web.xml
> ------------
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
>
> In login.jsp
> -------------
> <html:form action="/Login"
> name="LoginForm"
> type="com.xxx.yyy.LoginForm" >
>

Change the JSP above to be <html:form action="/Login" > . Not sure if that
will help, but the form name and type attributes are automatically picked
up from your struts-config file.

Susan


> > In struts-config.xml > --------------------- > > FORM-BEANS > ------------ > > <form-beans> > <form-bean name="LoginForm" type="com.xxx.yyy.LoginForm"/> > </form-beans> > > GLOBAL FORWARDING > ------------------ > > <global-forwards> > <forward name="Login" path="/login.jsp"/> > </global-forwards> > > ACTION MAPINGS > ---------------- > > <action-mappings> > <action path="/Login" type="com.xxx.yyy.LoginAction" scope="request" > input="/login.jsp" name="LoginForm"> > <forward name="Success" path="/welcome.jsp"/> > <forward name="Failure" path="/login.jsp"/> > </action> > > > With the above code, when the login.jsp is submitted the values have to be > filled in LoginForm which is an ActionForm for the ActionClass LoginAction . > > The associated action path is supposed to be /Login but when the jsp is > submitted i get an error page saying > > The requested resource (/MyApp/Login.do) is not available. > > Can somebody point me where am i wrong ? > > I am using Tomcat 4.1.24, Struts 1.1 > > TIA > > Meka Toka > > PS: And Yes, I have defined the ActionServlet in the web.xml > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > > --------------------------------------------------------------------- > 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]


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



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



Reply via email to