struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeoffrey Bakker" <jeoffrey.bak...@gmail.com>
Subject Re: This is odd, sometimes my requests 'miss' the Struts2 filter
Date Thu, 10 Jul 2008 12:13:31 GMT
Hi,

Are you sure that the behaviour was really odd? So, you didn't have
different entry points to show login page. E.g. directly requesting the
login page or being forwarded by an other url.

Regards,
Jeoffrey


2008/7/10 Lyallex <lyallex@gmail.com>:

> Hello
>
> Tomcat version  5.5.26
> Struts2 version 2.0.11.1
>
> I'm trying to understand why, given the following in web.xml requests
> sometimes 'miss out' the Struts2 filter
>
> <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>
>
>
> It appears to really only be an issue with web.xml declarative security
>
> Reading around the various archives it appears that this is a know issue
> when trying to use Struts2 Actions as the target but I'm not trying to do
> that
> I just use a standard jsp.
>
> <odd>
>
> The really odd thing is that the login process works perfectly
> sometimes and sometimes it fails with the (apparently well known) message
>
> The Struts dispatcher cannot be found.
> This is usually caused by using Struts tags without the associated filter
> ...
>
> </odd>
>
> Here's the login config
>
> <login-config>
>  <auth-method>FORM</auth-method>
>  <realm-name>Form based authentication</realm-name>
>  <form-login-config>
> <form-login-page>/login.jsp</form-login-page>
> <form-error-page>/login.jsp</form-error-page>
>  </form-login-config>
> </login-config>
>
> Someone, somwhere on my journey through the archives suggested this fix.
>
> <filter-mapping>
>  <filter-name>struts2</filter-name>
>  <url-pattern>/*</url-pattern>
>  <dispatcher>REQUEST</dispatcher>
>  <dispatcher>FORWARD</dispatcher>
> </filter-mapping>
>
> It does appear to solve the problem I was just wondering why ?
>
> Is there a definitive resolution to this problem out there somewhere ?
>
> TIA
>
> lyallex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message