This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how do I use the standard authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how do I use the standard authentication " Watch "how do I use the standard authentication " New topic
Author

how do I use the standard authentication

jonathan Greens
Ranch Hand

Joined: Apr 07, 2004
Posts: 139
sometimes when I go to certain secure sites, there will be a native popup initiated by the browser to input user name and password. this is similar to when you go to an ftp site, it sometimes require you to log in. How does this work? How would I initiate this from the server side?
thanks
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It's called Basic Authentication. And, it's implemented by you setting the appropriate header and status in your resoponse back to the client. Another way is to just specify via your deploment descriptor (web.xml) which resources are protected. Just search the net or take a look at the example in chapter 4 of the following very good book.

Core Servlets


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how do I use the standard authentication
 
Similar Threads
No source code
what do you call 3/4th in english
Circular references
Taking notes.
Where To Package Enums