--using tiles and container managed security/form based login -see below
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> Sent: Monday, October 28, 2002 4:14 PM
> To: Struts Developers List
> Subject: Re: [SURVEY] HREF attribute for FormTag
>
>
>
>
> On Mon, 28 Oct 2002, Alan P Sexton wrote:
>
> > Date: Mon, 28 Oct 2002 20:20:36 +0000
> > From: Alan P Sexton <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: Struts Developers List <[EMAIL PROTECTED]>
> > Subject: Re: [SURVEY] HREF attribute for FormTag
> >
> >
> > Here is a problem which _MIGHT_ benefit from the proposal.
> I am still
> > too much of a newbie to be sure but haven't found any
> discussion of it
> > in the lists or docs
> >
> > I'm using container managed security with form
> authentication. Because
> > of the context path prepending problem, I can't use FormTag for
> > j_security_check but must use HTML <form> instead. This
> means I can't
> > use the struts-html tags in the form. I have not been able
> to get login
> > error messages handled in the login page in the way I used to when I
> > depended on programmatic security as per the struts example.
> >
> > I would like my login page to have the same look and feel
> as the rest of
> > my pages. I have not been able to figure out (yet) how to
> use tiles for
> > this page (which I use for the rest of my web app) and have
> been reduced
> > to manually simulating my tiles based layout (no great hassle but
> > annoying).
> >
>
> It's not going to be feasible to use the Struts HTML tags for the form
> login page even with such an attribute. Among other things:
>
> * There is no such thing as a form bean associated with the
> form login page, so you can't use the automatic redisplay
> functionality anyway.
>
> * The servlet spec *requires* the use of "j_security_check" as
> the submitted-to URL, and "j_username"/"j_password" as the
> field names. There isn't much value add in using the Struts
> tag equivalents in these things, even if you could.
>
> > Perhaps with some guru magic all this is possible but I
> suspect that the
> > HREF attribute might help.
> >
>
> I don't see how the ability to use Tiles for layout management of this
> page is connected to use of the <html:form> tag with an "href".
>
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
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>