Re: How to prevent access to pdf files

2003-06-04 Thread John Brayton
I am on a page. There are a list of pdf files on the page. If a user
clicks on a pdf file, I want him to be redirected to a login page if he
is not logged in.
However this doesnt seem to be happening even with filters. Does the
click on a pdf file not recognized as a request?
Verify that the PDF is part of the webapp, and is being served by 
Tomcat.  Also verify that the web.xml file specifies that the 
filter should be processing requests for the .pdf suffix.  Often 
filters are configured to only process requests routed to servlets or 
JSP's.

John

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


RE: How to prevent access to pdf files

2003-06-04 Thread Varun Garg
The way I have handled the problem in the past is to create a servlet
streaming out the pdf and then I have complete control over
authorizations. I would set the mime types to the pdf and then browser
will treat it properly.



-Original Message-
From: John Brayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Re: How to prevent access to pdf files


I am on a page. There are a list of pdf files on the page. If a user 
clicks on a pdf file, I want him to be redirected to a login page if he

is not logged in. However this doesnt seem to be happening even with 
filters. Does the click on a pdf file not recognized as a request?

Verify that the PDF is part of the webapp, and is being served by 
Tomcat.  Also verify that the web.xml file specifies that the 
filter should be processing requests for the .pdf suffix.  Often 
filters are configured to only process requests routed to servlets or 
JSP's.

John

-
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]



Re: How to prevent access to pdf files

2003-06-03 Thread Xu Cheng
The click should create a HTTP request. I would suggest that you put logging 
statements in your filter to figure out what happened. Did you configure your 
filter properly in web.xml so that it will intercept the requests to those 
PDF files?

On Monday 02 June 2003 16:10, Tapan Nanawati wrote:
 Hi all,
 I am on a page. There are a list of pdf files on the page. If a user
 clicks on a pdf file, I want him to be redirected to a login page if he
 is not logged in.
 However this doesnt seem to be happening even with filters. Does the
 click on a pdf file not recognized as a request?
 Please suggest, although the question is slightly offtopic.
 Regards
 Tapan


 -
 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]



Re: How to prevent access to pdf files

2003-06-03 Thread Erik Price


Tapan Nanawati wrote:
Hi all,
I am on a page. There are a list of pdf files on the page. If a user
clicks on a pdf file, I want him to be redirected to a login page if he
is not logged in. 
However this doesnt seem to be happening even with filters. Does the
click on a pdf file not recognized as a request?
Make sure there is a return statement after the redirect.  This prevents 
the filter from continuing to process the request (serving the PDF) 
while the redirect is processing.  I had this same problem protecting 
JSPs in this fashion once.

Erik

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


How to prevent access to pdf files

2003-06-02 Thread Tapan Nanawati
Hi all,
I am on a page. There are a list of pdf files on the page. If a user
clicks on a pdf file, I want him to be redirected to a login page if he
is not logged in. 
However this doesnt seem to be happening even with filters. Does the
click on a pdf file not recognized as a request?
Please suggest, although the question is slightly offtopic.
Regards
Tapan


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