You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dennis Muhlestein <de...@zserve.com> on 2002/06/26 17:26:52 UTC
Re: Best Practice for mapping servlets SOLVED
Thanks for the input. I've come to the following conclusion that
seems to solve the problem.
Instead of applying a filter to *.do. I applied it to /members/*.do
Then I changed the path of any protected page to /members/... . I got
rid of the *.dm mapping.
This way, I don't have to extend a custom "protected" action class in
order to perform the session management. I can still have unprotected
pages by placing them in any path besides one that starts with /members/
-Dennis
On Tue, 2002-06-25 at 16:39, emmanuel.boudrant wrote:
>
> There is some Best Practice in Struts catalog by Ted Husted. You can found it at http://husted.com/struts/catalog.htm
> -Emmanuel
> "emmanuel.boudrant" <b7...@yahoo.fr> a écrit :
> Hi,
> I think only one mapping is managing in struts, it's the first found in your web.xml. Perhaps you should to subclass struts Action class by a PublicAction and and SecureAction. In SecureAction class, implement the login/session.
> All secure action (*.dm) must extend your class SecureAction...all public action must extend your class PublicAction.
>
> -Emmanuel
> Dennis Muhlestein a écrit : Maybe rewording this can generate better response:
>
> If I have two extensions that map to my action, can I specify which one
> to append when a jsp tag outputs the link?
>
> I have *.do and *.dm both mapped so that I can use a filter in front of
> one.
>
> When I use the html:form tag, I write
>
>
> html that get's outputted is
>
>
> Any Suggestions?
> TIA
> -Dennis
>
>
> On Tue, 2002-06-25 at 10:29, Dennis Muhlestein wrote:
> > I have two mappings for the actions servlet. The reason is:
> > one mapping goes through a filter for login/session management. The
> > other is public.
> >
> > Mapping Extensions are dm=public-no filter, do=logged in-filtered
> >
> > My problem is:
> > I specify ....
> >
> > in my jsp page but when the tag outputs the html it changes the action
> > to /Login.do which is filtered.
> >
> > That makes it so I can't log in.
> >
> > Is there a better way to do this or is this a bug? Seems to me struts
> > is ignoring what I type and looking up the action then printing the
> > extension from that. If I change the order of my mappings in web.xml,
> > the opposite occurs. My private pages then get mapped to the public
> > extension. Whichever extension appears second in the web.xml is used.
> >
> > Any suggestions?
> > Thanks
> > Dennis
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
>
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
>
>
>
> ---------------------------------
> Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>