• Post Reply Bookmark Topic Watch Topic
  • New Topic

Protecting a web page.  RSS feed

 
Robert James Liguori
Author
Ranch Hand
Posts: 583
6
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Mark Anthony Ranullo
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!