struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kanoza, Douglas (NCI)" <kano...@mail.nih.gov>
Subject RE: Help needded on Struts-config file
Date Fri, 22 Feb 2002 20:49:35 GMT
That's pretty much how it works.  If you look at the code in the LogonAction
in the example, they check for the existence of the database and also
compare the supplied password with the password in the database.  If there's
a problem in either case, they save the errors and redirect to the input
page.  LogonForm.validate() is only checking to see that username and
password exist - it doesn't actually check to see if they are valid.  That's
done in the LogonAction, which needs to redirect you to the input page if
the logon fails.  The code snippet below (from LogonAction.java) shows how
it's used.  The getInput() method on the ActionMapping class returns the
input page specified.

   if(!errors.empty())
    {
      saveErrors(request, errors);
      return(new ActionForward(mapping.getInput()));
    }

-----Original Message-----
From: Lundin, Michael [mailto:Michael.Lundin@SUMMITSITE.COM] 
Sent: Friday, February 22, 2002 3:41 PM
To: 'Struts Users Mailing List'
Subject: RE: Help needded on Struts-config file

My understanding of the input is that it's a mapping to the document that
submits the form.  For this example, it's the page that presents you with
the username/password screen.

This way if there is an error, you can send the user back to the input
screen that they came from.

-----Original Message-----
From: subhendukumar mohanty [mailto:subhendukm@infy.com]
Sent: Friday, February 22, 2002 12:37 PM
To: struts-user@jakarta.apache.org
Subject: Help needded on Struts-config file


Hi

One of the mapping in struts-config.xml file comes with example is as
follows

<action-mappings> 
<action path="/logon" type="org.apache.struts.example.LogonAction"
 name="logonForm"
 scope="request"
 input="/logon.jsp"
 unknown="false" validate="true" /> 
</action-mappings> 

Could anybody explain me what the "input" element means. How it is used by
controller.

Thanks,
Subhendu

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message