Well, it's printing out the value I assign in the web.xml file.
Still it is not recognizing the user/password pairs. I think that I don't
have the correct value but I don't know what correct would be?

I am using the code from Marty Hall's core servlets book called
protectedPage, and it should be straightforward but not. 

Sandra Patricia Hunter
Systems Development and Web Design 
 


-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: March 27, 2003 11:05 AM
To: Tomcat Users List
Subject: Re: Registering Servlets




Sandra Patricia Hunter wrote:

> What happens is that when I enter what should be correct 
> username/password pairs they are not recognized. The value above for 
> the name passwordFile is not correct so I do not see the page as I 
> should.
> 
> Does that help?

Sort of.  I mean, I understood the nature of the problem, but wasn't 
sure if you were getting an exception or compiler error.

Are you sure that it's a matter of reading the init-param?  I'd try 
printing out the value of that init-param from your servlet with code 
similar to this in doGet():


   String name = "passwordFile";
   String value = this.getServletConfig(
                              ).getInitParameter(name);
   PrintWriter out = resp.getWriter();
   out.println("<h1>The value of " + name + " is " + value + "</h1>");

This will tell you whether or not it's a problem with your web.xml file 
or if it's your bidness logic.

Also, not sure if you fully stopped and started Tomcat...


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to