wood burning stoves 2.0*
The moose likes Servlets and the fly likes bypass basic authentication dialog box using servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "bypass basic authentication dialog box using servlet" Watch "bypass basic authentication dialog box using servlet" New topic
Author

bypass basic authentication dialog box using servlet

carlos flamenco
Greenhorn

Joined: Feb 28, 2001
Posts: 7
Hi,
I want to avoid the basic authentication dialog box appearing when i access a particular part of my web server. I would like the servlet to do the basic authentication by posting a username and password.The servlet will already have the necessary username and password. Is this possible , and if so are there any example source code for this??
Any help would be greatly appreciated,
thanks
Carlos
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
There is an excellant example in the examples for Jason Hunter's book "Java Servlet Programming (2nd Edition)" The example is for an Applet to communicate back to a servlet requiring Basic Authentication but can work with your servlet or an application. It uses a class he created called "HttpMessage" and "Base64Encode"
The examples are at http://examples.oreilly.com/jservlet2/ If you don't have a copy of his book, I recommend it! Ajith gave it 10 Horseshoes!
------------------
I Hope This Helps
Carl Trusiak, SCJP2


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bypass basic authentication dialog box using servlet