Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

acces pdf files after user authentication

 
varun bihani
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic