struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan P Sexton <A.P.Sex...@cs.bham.ac.uk>
Subject Re: Using tiles and container managed security/form based login
Date Mon, 28 Oct 2002 23:48:51 GMT

I am using logic:forward rather than jsp:forward. I had not checked it
but had assumed (perhaps naively) that since that is part of struts, it
would be tiles plugin aware. If it is not, then that would certainly
explain my symptoms and your suggestion will fix it.

Many thanks again.

Alan

 > ....
 > >
 > > I then tried replacing the /logon.jsp forward to
 > > /WEB-INF/jsp/logon.jsp
 > > to a forward to my new logon tile "tile.cmsLogon". This does not
 > > work. However I am sure that the setup of this tile is correct (famous
 > > last words). I suspect it is something to do with how tile definitions
 > > are spliced into the forwards' namespace but have not had
 > > time to figure
 > > out enough of the Struts sources to be sure.
 > 
 > Are you using jsp:forward to forward from the logon.jsp? If so, that tag
 > doesn't know how to handle tiles. You need to send the request through the
 > controller servlet, with tiles properly setup. Then the tiles plug-in
 > intercepts the forward and checks to see if it's really a tile.
 > 
 > --from struts-config.xml
 > <action path="/login" type="org.eei.rpwr.common.ui.LoginAction">
 > 	<forward name="success" path="nav.login" redirect="false" />
 > </action>
 > 
 > --from tiles-definitions.xml
 >     <definition name="nav.login" extends="standard">
 >         <put name="body"   value="nav.login.body" />
 >     </definition>
 >     <definition name="nav.login.body" path="/tiles/toplevel.jsp">
 >         <put name="content"   value="/login.jsp" />
 >     </definition>
 > 
 > 
 > > I hadn't thought of forwarding to a proper action instead which could
 > > forward to a tile.
 > >
 > > Many thanks
 > >
 > > Alan
 > >
 > > Hal Deadman writes:
 > >  >
 > >  > I have a container managed security login page fragment that is a Tile and
 > >  > don't recall having any problem. Is the problem that you are trying to
 > >  > specify a tile as the <form-login-page>? My form is using HTML for
the form
 > >  > tag and the username and password fields. When I specify the login page,
I
 > >  > specify struts actions as follows to give me a little more control over what
 > >  > I display on the login jsp. The login.do action is then mapped to a Tile
 > >  > component that eventually contains a login.jsp. You can use the url
 > >  > parameters to determine in your action if you need to display a message to
 > >  > the user about their login attempt not working.
 > >  >
 > >  >     <login-config>
 > >  >         <auth-method>FORM</auth-method>
 > >  >         <realm-name>RpowerRealm</realm-name>
 > >  >         <form-login-config>
 > >  >             <form-login-page>/login.do?type=attempt</form-login-page>
 > >  >             <form-error-page>/login.do?type=failed</form-error-page>
 > >  >         </form-login-config>
 > >  >     </login-config>
 > >  >
 > >  >
 > >  > > > Cheers,
 > >  > > >
 > >  > > > Alan
 > >  > >
 > >  > > Craig
 > >  > >
 > >
 > > Alan
 > 

--
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