This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authentication Dialog Box

 
Avinash venna
Greenhorn
Posts: 17
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some one look into this please...
 
Prasad Krishnegowda
Ranch Hand
Posts: 671
4
Eclipse IDE Java Spring
  • 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
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would servlet security for the download URL be sufficient?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic