File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authentication Dialog Box

 
Avinash venna
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Actually in my application i take a zip file which contains some files and upload it to a server. After uploading i am giving a link to download that file. When a user clicks that link a servlet will execute and a dialog box will appear with options ( open , save and cancel ).

My current requirement is when ever user clicks that link he should be prompted with a dialog box for authentication( he needs to enter username and password). If he enters correct credentials he can download or else it should go to error page...

Please some one guide me how to implement this.. I am new to this... Thanks in advance..

Regards,
Avi
 
Avinash venna
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some one look into this please...
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the user clicks that click, instead of servlet, let the HTML page get displayed, which asks for username and password, from there pass the control to the servlet, using action attribute.. Then, in the servlet, code which is for downloading the file, can be wriiten inside a if condition, that if condition, will check for the authentication method returning true or false.., By the By, how you need to authenticate? Is it against the data stored in database..
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would servlet security for the download URL be sufficient?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic