tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mike jackson" <mjack...@cdi-hq.com>
Subject RE: Authentication Filters
Date Fri, 18 Apr 2003 23:22:29 GMT
1) You told it.  Any file that is accessed is going to be checked.  Not
just the first file requested.  I'm going to go out on a limb and say
that perhaps you need to do some reading of how img tags work.  The html
page is one request, *each* img tag is another request to the web
server.  It may only use one socket connection and stream all of the
requests through that one socket, but each file is treated separately.

2) Ok, then the filter isn't allowing access for some reason.  Hopefully
you have a log that you can look at to determine why your filter choose
to not all access to the gifs.

3) Add a ".<extension>" to the url pattern, in other works like this:
	
	<url-pattern>/*.jsp</url-pattern>

What you might want to consider is building a list of files that are to
be protected, and re-write the filter to allow access to the resource
unless it's in the list of files.  That way you can still use the url
pattern which specifies any file, but only protect certain files.

--mikej
-=------
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: Melcy Mahesh [mailto:melcymahesh@yahoo.com]
> Sent: Friday, April 18, 2003 1:43 AM
> To: Tomcat
> Subject: Authentication Filters
> 
> Hi, I have written an Authentication Filter to check if the user is
> authenticated before accessing any web-page in my application. My
filter
> mapping is as follows.
>
>	<filter-mapping>        
>		<filter-name>AuthenticationFilter</filter-name>
>		<url-pattern>/*</url-pattern>
>	</filter-mapping>
> The functionality of the filter works fine.(Redirecting to the Logon
page,
> when the user is not authenticated) But, I notice that the
> filter.dofilter() is executed for every image(*.gif) that I have on my
> web-page.  1. Could someone please help me to understand why is that
the
> filter  gets executed for images, as though it is a new request?2.
None of
> the images are displayed on my screen. Why is it?3. Is there a way to
> modify my url-pattern so that the filter is not executed for my images
on
> the screen? Thanks,Melcy
> 
> 
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.



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


Mime
View raw message