Howdy,

>1. Is it a good idea to do so?

Depends on your use cases.  How many entry points does your app have?  

>2. The filter mapping tag in the web.xml now looks like:
>a. <filter-mapping>/*</filter-mapping>
>b. Would this not slow down the application, since in a standalone
>scenario, all request for images will also go through the filter?

Yes, that will slow down the app in the general standalone case.  But
maybe not by much.

If you have small (e.g. < 5) number of entry points you could just
individually map the filter to each one of those URL patterns.  All the
other pages should check the request is already authenticated and throw
an exception it if isn't.

Alternatively, if you keep the /* mapping, the filter could look at the
request URI (and/or other headers) itself and decide whether it needs to
authenticate or not.  Keeping that logic in the filter, rather than in
web.xml, is an option.  That way you could quickly skip over images and
other requests.

Yoav Shapira
Millennium ChemInformatics

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

Reply via email to