On Thu, Jul 10, 2008 at 1:13 PM, Jeoffrey Bakker
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Are you sure that the behaviour was really odd?

I can't think of a better word to describe it frankly

I have the following link

<a href="secure/Login">View my account</a>

This is a protected resource and requires a login
If you don't get to any other protected resource via this link you
have not initialised
your login session correctly and you are thrown out. It's worked for
me for years
in various web apps.

With Struts2 on board, sometimes when I click this link everything
works, sometimes it doesn't

If I have

<filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>

As far as I am aware then every request should be handled by this mapping.

Unless I am missing something of course

Rgds
lyallex

> 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 <[EMAIL PROTECTED]>:
>
>> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to