struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <ted.hus...@gmail.com>
Subject Re: multiple pattern mapping
Date Thu, 27 Apr 2006 12:25:06 GMT
Sadly, multiple extension mappings is not supported by Action 1 (*).
"There can only be one".

The usual workaround is to use different "folders" to represent
different authentification types. So, you'd have to have something
like /auth/something.do versus /open/something.do.

For more complex authentification tasks, many people find
ServletFilter and Acergi useful.

* http://securityfilter.sourceforge.net/

* http://www.acegisecurity.org/

HTH, Ted.

(*) Albeit, multiple Action extensions is supported by WebWork2/Action2.

On 4/25/06, Mike Korcynski <Mike.Korcynski@tufts.edu> wrote:
> Hi,
>
>  I'm trying to use 2 different pattern mappings to the action servlet,
> and have one handle protected action and one handle public actions using
> security-constraints, the mappings look like this:
>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.auth</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
>
>
> The problem is in my form.jsp I specify my action specifically as
> authorize.auth, and yet when the page renders the action is always
> changed back to authorize.do
>
> <html:form method="post" action="/authorize.auth">
>
> <form name="authorizeForm" method="post" action="/sample/authorize.do">
>
> The action mappings in my struts-config is like this:
>
> <action path="/authorize"
>                 input="/form/login.jsp"
>                 name="authorizeForm"
>                 type="blah.action.AuthorizeAction"
>                 scope="request"
>                 validate="false">
>                 <forward name="success" path="/form/mainmenu.jsp"/>
>                 <forward name="failure" path="/form/blah.jsp"/>
>     </action>
>
> Any idea what could be wrong?
>
> Thanks for your help,
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
HTH, Ted.
** http://www.husted.com/ted/blog/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message