my dog learned polymorphism
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What's wrong with my Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What Watch "What New topic

What's wrong with my Authentication

Marcelo Heitor

Joined: Aug 20, 2005
Posts: 14
Hello folks,

I have a doubt on the chapter 12 of the book Head-First Servlets and JSP, I tried to do an authentication example in agreement with the book but I don't get to call the standard form of the browser, it follows the example

in tomcat-users.xml ********************************************
<?xml version='1.0' encoding='utf-8'?>
<role rolename="Guest"/>
<role rolename="Adm"/>
<role rolename="Member"/>
<user username="Annie" password="admin" roles="Adm,Member,Guest"/>
<user username="Diane" password="coder" roles="Member,Guest"/>
<user username="Ted" password="newBie" roles="Guest"/>

in web.xml in my application, called Beer *********************************

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

<web-app xmlns=""





and it follows the structure of pastes used in the application ************
-->Beer (with. jsp that calls a servlet through method get)
-->WEB-INF (with web.xml)
-->AddRecipe (with servlet.class)

obs: It�s works, but I don't get to call the form of authentication of the browser
Zhing Lam

Joined: Dec 06, 2004
Posts: 7
How do you type for request the resource? I mean, you type something like:

Marco Fung

Joined: Jul 25, 2005
Posts: 7
In your tomcat setting, you use Admin.

but in your web.xml, you use a different name, Adm.
Marcelo Heitor

Joined: Aug 20, 2005
Posts: 14
Folks, the code started to function suddenly, is stranger... but OK. I am thankful for the help!!!

Marcelo Heitor
Bras�lia - Brazil
I agree. Here's the link:
subject: What's wrong with my Authentication
It's not a secret anymore!