wood burning stoves 2.0*
The moose likes Tomcat and the fly likes acces pdf files after user authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "acces pdf files after user authentication" Watch "acces pdf files after user authentication" New topic

acces pdf files after user authentication

varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
I want to make my pdf file available to the users who have registered(ie they have login and password)
so my url may be www.domain-name.com/filename.pdf
but this url can be accessed by any user who types in this url in the browser.. I want to make it password protected..
ie every user gets his password and after his verification only he is allowed to view...
Hope all this is clear to everybody....
I have linux server, & tomcat....
I also dont understand is JSP forum is the right forum for this topic...
Plzz help

<a href="http://www.galaxyweblinks.com" target="_blank" rel="nofollow">www.galaxyweblinks.com</a><br /><a href="http://www.freechatcode.com" target="_blank" rel="nofollow">www.freechatcode.com</a><br /><a href="http://www.onlinefamilytreemaker.com" target="_blank" rel="nofollow">www.onlinefamilytreemaker.com</a>
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Check out the container authentication in the Tomcat and other application servers. In tomcat you configure 'Realms', I'm not sure of the Tomcat version you are using, but some sample documentation is here
The easiest thing would be to declare a /pdf directory as secured, then users will have to authenticate to access any file including pdfs in that directory.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60738

David's suggestion is certainly the easiest way to accomplish this once you figure out how to admin Tomcat. Moving this to the Tomcat forum for further discussion.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Don't get me started about those stupid light bulbs.
subject: acces pdf files after user authentication
Similar Threads
session object security question
Opening a File with the appropriate program with highlighted text
SSL certificates for each one of the Tomcat Instances on single machine
storing values in session during authentication
Access protected folder without password