Paul Barry wrote:

<action path="/myaccount/login" type="myapp.struts.actions.ForwardAction" scope="request"
name="LoginForm" validate="false" parameter="/WEB-INF/jsp/myaccount/login.jsp" />
<action path="/myaccount/loginAction" type="myapp.struts.actions.LoginAction" scope="request"
name="LoginForm" validate="true" input="/myaccount/login.do" />


So, the user goes to /myaccount/login.do, and they are presented with a form. The code for that looks like this:

<html:html>
  <body>
   <html:form method="POST" action="/loginAction.do">
      Username:&nbsp;<html:text property="username"/><br />
      Password:&nbsp;<html:password property="password" /><br />
      <html:submit/>
    </html:form>
  </body>
</html:html>

<snip>


What I am struggling with is that when I submit this form, if username is not null, but password is, the username field is not populated with the value for username.

My guess is the problem lies in that it looks like when validation fails you are forarding to another action. I could be wrong though. Usually the input value is a jsp page or tile and not an Action (at least as far as I'm aware). You're probably getting a whole new Request object built when you go to the login.do action and are losing your request scoped form. Try changing the login.do to the name of the jsp page of your login form.



-- Rick

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



Reply via email to