• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

bypass basic authentication dialog box using servlet  RSS feed

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!