How to protect static HTML's

2003-06-25 Thread Ivan Ivanov
Dear Tomcat List, I am facing the following problem. We have some static html files in our Servlet/JSP project which reside in a separate directory and we want to restrict the access to them both from within the project and by typing the URL directly in the browser. The rules of accesing them are:

RE: How to protect static HTML's

2003-06-25 Thread Collins, Jim
] Sent: 25 June 2003 17:04 To: [EMAIL PROTECTED] Subject: How to protect static HTML's Dear Tomcat List, I am facing the following problem. We have some static html files in our Servlet/JSP project which reside in a separate directory and we want to restrict the access to them both from within

Re: How to protect static HTML's

2003-06-25 Thread Justin Ruthenbeck
Ivan -- You're really close to getting it ... two options: (1) Keep your servlet the way it is. Add a request attribute (req.setAttribute()) during your security check if the security check finishes successfully. Check for this attribute before doing the security check again. Think of this

RE: How to protect static HTML's

2003-06-25 Thread Shapira, Yoav
Howdy, (2) Use filters. All filters set for a particular request are run *once* on an incoming request. If you do a RequestDispatcher.forward(), the filters will not be run again -- and you won't have recursion. I wouldn't suggest that option, as it may break when the Servlet Specification

RE: How to protect static HTML's

2003-06-25 Thread Mike Curwen
-Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's Howdy, (2) Use filters. All filters set for a particular request are run *once* on an incoming

Re: How to protect static HTML's

2003-06-25 Thread Tim Funk
If you configure it to do so. -Tim Shapira, Yoav wrote: Howdy, (2) Use filters. All filters set for a particular request are run *once* on an incoming request. If you do a RequestDispatcher.forward(), the filters will not be run again -- and you won't have recursion. I wouldn't suggest

Re: How to protect static HTML's

2003-06-25 Thread Jean-Francois Arcand
Mike Curwen wrote: -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's Howdy, (2) Use filters. All filters set for a particular request are run *once

RE: How to protect static HTML's

2003-06-25 Thread Justin Ruthenbeck
At 10:57 AM 6/25/2003, you wrote: -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's Howdy, (2) Use filters. All filters set for a particular request are run

RE: How to protect static HTML's

2003-06-25 Thread Shapira, Yoav
Howdy, I wouldn't suggest that option, as it may break when the Servlet Specification v2.4 will be different. Filters will run on the same request through RequestDispatcher.forward. Only when you specify that they are to be run that way. You can specify that they only be run on incoming

RE: How to protect static HTML's

2003-06-25 Thread Michael Duffy
] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's Howdy, (2) Use filters. All filters set for a particular request are run *once* on an incoming request. If you do a RequestDispatcher.forward(), the filters

Re: How to protect static HTML's

2003-06-25 Thread Michael Duffy
Oops, I meant serlvet spec 2.4. --- Jean-Francois Arcand [EMAIL PROTECTED] wrote: Mike Curwen wrote: -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's

RE: How to protect static HTML's

2003-06-25 Thread Justin Ruthenbeck
dispatcher element. justin --- Justin Ruthenbeck [EMAIL PROTECTED] wrote: At 10:57 AM 6/25/2003, you wrote: -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static

Re: How to protect static HTML's

2003-06-25 Thread Jean-Francois Arcand
: At 10:57 AM 6/25/2003, you wrote: -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 12:53 PM To: Tomcat Users List Subject: RE: How to protect static HTML's Howdy, (2) Use filters. All filters set