aspose file tools
The moose likes JSF and the fly likes Protecting a web page. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Protecting a web page." Watch "Protecting a web page." New topic
Author

Protecting a web page.

Robert Liguori
Author
Ranch Hand

Joined: Nov 27, 2007
Posts: 426
I need to password protect a webpage that has three PDF files on it... I also need to make sure that noone can get to the PDF files directly.

What is the easiest way to do this?

I currently am using JSF but am trying to avoid working with backing beans and access filters for this seemingly simple requirement.

Thanks!


Robert J. Liguori - OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803)
Mark Anthony Ranullo
Greenhorn

Joined: Dec 21, 2010
Posts: 6
Robert Liguori wrote:I need to password protect a webpage that has three PDF files on it... I also need to make sure that noone can get to the PDF files directly.

What is the easiest way to do this?

I currently am using JSF but am trying to avoid working with backing beans and access filters for this seemingly simple requirement.

Thanks!


You could configure your web.xml of your app and specify security constraints to the URLs of your PDF files. Or you could also try using filters and check the user's credential stored in the session to determine whether to stop the filter chain and send an HTTP code 403 or continue with the chain effectively granting the user access to the PDF files.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Protecting a web page.
 
Similar Threads
Div inner Html to PDF
Covert a PDF to PDF/A format using iText
Tar a folder excluding pdf's
Acessing PDF Files
working with pdf.... in java j2ee