You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arne Brutschy <ma...@studserv.uni-leipzig.de> on 2003/11/17 14:45:17 UTC

Strange things happen to my servlet path..

Hello,

I got the following problem:

I used this test setting for my login filter:

  <filter-mapping>
    <filter-name>authenticationFilter</filter-name>
    <url-pattern>/groups.jsp</url-pattern>
  </filter-mapping>

Everything worked as expected. Now, as the filter ist done and tested,
I wanted to protect the whole page. I've tried this by defining

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

The problem is, when I do this, the browser cannot find any resource
files (not application resource files) like Stylesheets, Pictures etc.
Additionally, the login seems to work, but the forward to the
requested page does not work.

Has anyone an explation for this strange behavior?

Regards,
Arne


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


Re: Strange things happen to my servlet path..

Posted by Arne Brutschy <ma...@studserv.uni-leipzig.de>.
Hello,

Monday, November 17, 2003, 2:45:17 PM, you wrote:
AB> I got the following problem:
AB> [...]
AB> Has anyone an explation for this strange behavior?

Ok, I realized that the missing images etc. happen in both cases. In
the first case, I used to request index.jsp first, and after that the
secured page. So everything got cached and seemed to work..

The conclusion is, that something is wrong with filter. I'm not sure,
but using <url-pattern>/*</url-pattern> as pattern protects the
resources as well, doesn't it? So using such a generic pattern is not
possible for me, as the login page should have some colors.. :)

Is there a possibility to define an exclude list? A pattern of
<url-pattern>/*.jps</url-pattern> didn't seem to work.

Whats the best way to deal with this?

Regards,
Arne



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


Re: Strange things happen to my servlet path..

Posted by alvin antony <al...@yahoo.com>.
Hi,
 
It is very easy to explain, as you see he filter all resources including pix etc, and this normally  result to make a endless loop. I would prefer to limit the filtermapping either to a 'url format ' like /admin/secure/* or *.jsp and *.do. btw,  if you use any of tomcat authenticator instead of a Filter , they can catch if  it is request for a resource from a jsp  and the user session is already authenticated( bcz they save the session for checking).
HTH
Alvin

Arne Brutschy <ma...@studserv.uni-leipzig.de> wrote:
Hello,

I got the following problem:

I used this test setting for my login filter:


authenticationFilter
/groups.jsp


Everything worked as expected. Now, as the filter ist done and tested,
I wanted to protect the whole page. I've tried this by defining


authenticationFilter
/*


The problem is, when I do this, the browser cannot find any resource
files (not application resource files) like Stylesheets, Pictures etc.
Additionally, the login seems to work, but the forward to the
requested page does not work.

Has anyone an explation for this strange behavior?

Regards,
Arne


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

Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.