> I have a tile, with the login form at the upper right part of 
> the tile.
> My login form is made of 2 JSP: username.jsp and password.jsp.
> 
> My tile is managed by Main.jsp.
> 
> My mappings are:
> <action path="/Username" 
>         type="net.lolive.action.SuccessAction" 
>         name="LoginForm2" 
>         scope="session" 
>         validate="true" 
>         input="/login/Username.jsp">
>  <forward name="success" path="/Password.do"/>       
> </action>
> 
> <action path="/Password" 
>         type="net.lolive.action.SuccessAction" 
>         name="LoginForm2" 
>         scope="session" 
>         validate="true" 
>         input="/login/Password.jsp">
>  <forward name="success" path="/DoLogin.do"/>       
> </action>
> 
> <action path="/DoLogin" 
>         type="net.lolive.action.LoginAction" 
>         name="LoginForm2" 
>         scope="session">
>  <forward name="success" path="/Logged.do"/>
>  <forward name="failure" path="/DoLogout.do" />
> </action>
> 
> <action path="/DoLogout" 
>         type="net.lolive.action.LogoutAction" 
>         name="LoginForm2" 
>         scope="session">
>  <forward name="success" path="/LoginManager.do"/>           
> </action>
> 
> <action path="/Logged" 
>         type="net.lolive.action.SuccessAction">
>  <forward name="success" path="/login/Logged.jsp"/>       
> </action>
> 
> Username.jsp has a form which action is /Username.
> Password.jsp has a form which action is /Password.
> 
> Validation for path /Username is simply a test of "required".
> Validation for path /Password is simply a test of "required".
> 
> SuccessAction is just an action which always send "success"
> (don't ask why, it just works better with tiles that ForwardAction).
> 
> I have one problem: this pattern works fine when used outside 
> of a tile.
> Inside a tile, it does not work properly. As soon as you 
> submit the username
> correctly, you are sent to Password.do, validation fails and you are 
> sent to Password.jsp.
> Wow, I would have liked it to be Main.jsp, with Password.jsp 
> in the upper
> right corner.
> 
> It seems that Struts validation and tiles simply cannot co-exist
> pacifically.
> Or I missed something.

I answer to myself.
To manage that, I simply had to add an action:
<action path="/PopulateLoginForm" 
        type="net.lolive.action.SuccessAction" 
        name="LoginForm2" 
        scope="session">
 <forward name="success" path="/Main.do"/>           
</action>

And change all my forms action to "/PopulateLoginForm".

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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

Reply via email to