You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kishore Kumar <ki...@aol.com> on 2009/11/27 06:41:48 UTC
FilterDispatcher configuration in web.xml
Hi,
Is there a way to change the FilterDispatcher URL Pattren other than /*?
I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored.
Can i use url-pattren /*.action ?
As per the struts documentation it says to use following
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Thanks,
Kishore
Re: FilterDispatcher configuration in web.xml
Posted by phillips1021 <bp...@ku.edu>.
When we use additional Filter classes in our Struts 2 applications, we have
to put the
additional filter and filter mapping nodes before the filter and filter
mapping nodes for the
Struts 2 filter.
For example:
<filter>
<filter-name>OpenSSODevFilter</filter-name>
<filter-class>
edu.ku.itsd.opensso.filter.OpenSSODevFilter
</filter-class>
<init-param>
<param-name>reloadConfigURI</param-name>
<param-value>/reload-headers.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>OpenSSODevFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<!-- declare the Struts 2 filter -->
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>struts.devMode</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.enable.DynamicMethodInvocation</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>struts.convention.classes.reload</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.ognl.allowStaticMethodAccess</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.ui.theme</param-name>
<param-value>xhtml</param-value>
</init-param>
<init-param>
<param-name>struts.custom.i18n.resources</param-name>
<param-value>global-messages</param-value>
</init-param>
</filter>
<!-- restrict the Struts 2 filter to be called only when specific
URLs are called. -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
Also note the new Struts 2 filter class that is recommended for Struts 2.1.3
and later versions.
Bruce Phillips
Kishore Kumar-4 wrote:
>
> Hi,
>
> Is there a way to change the FilterDispatcher URL Pattren other than /*?
> I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren
> ICEFaces requests are being ignored.
>
> Can i use url-pattren /*.action ?
>
> As per the struts documentation it says to use following
>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
>
>
> Thanks,
> Kishore
>
>
--
View this message in context: http://old.nabble.com/FilterDispatcher-configuration-in-web.xml-tp26539480p26545351.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: FilterDispatcher configuration in web.xml
Posted by Wes Wannemacher <we...@wantii.com>.
I think you can safely map to *.action and /struts/*
-Wes
On Fri, Nov 27, 2009 at 12:41 AM, Kishore Kumar <ki...@aol.com> wrote:
> Hi,
>
> Is there a way to change the FilterDispatcher URL Pattren other than /*?
> I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren ICEFaces requests are being ignored.
>
> Can i use url-pattren /*.action ?
>
> As per the struts documentation it says to use following
>
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
>
>
> Thanks,
> Kishore
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: FilterDispatcher configuration in web.xml
Posted by phillips1021 <bp...@ku.edu>.
When we use additional Filter classes in our Struts 2 applications, we have
to put the
additional filter and filter mapping nodes before the filter and filter
mapping nodes for the
Struts 2 filter.
For example:
<filter>
<filter-name>OpenSSODevFilter</filter-name>
<filter-class>
edu.ku.itsd.opensso.filter.OpenSSODevFilter
</filter-class>
<init-param>
<param-name>reloadConfigURI</param-name>
<param-value>/reload-headers.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>OpenSSODevFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<!-- declare the Struts 2 filter -->
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>struts.devMode</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.enable.DynamicMethodInvocation</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>struts.convention.classes.reload</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.ognl.allowStaticMethodAccess</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.ui.theme</param-name>
<param-value>xhtml</param-value>
</init-param>
<init-param>
<param-name>struts.custom.i18n.resources</param-name>
<param-value>global-messages</param-value>
</init-param>
</filter>
<!-- restrict the Struts 2 filter to be called only when specific
URLs are called. -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
Also note the new Struts 2 filter class that is recommended for Struts 2.1.3
and later versions.
Bruce Phillips
Kishore Kumar-4 wrote:
>
> Hi,
>
> Is there a way to change the FilterDispatcher URL Pattren other than /*?
> I am using ICEFaces and struts2 togeather but due to struts2 URL Pattren
> ICEFaces requests are being ignored.
>
> Can i use url-pattren /*.action ?
>
> As per the struts documentation it says to use following
>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
>
>
> Thanks,
> Kishore
>
>
--
View this message in context: http://old.nabble.com/FilterDispatcher-configuration-in-web.xml-tp26539480p26545350.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org