At 11:04 AM 3/27/2003, you wrote:
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?

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.

When dealing with pure java like you are here, it's generally a good idea to setup your file path names like this:


C:/home/whatever/webapp/passwords.props

instead of using the escaped slashes. Java will convert this to your OS-specific path separator *if* you are specifying a file that the JVM will load. I suspect that if you do what Erik suggested above, you'll find that your initparam is something like this:

c:\home\whatever\webapp\passwords.props

which, when given to the FileOutputStream, will result in a search for a file named:

c:/ome/hatever/ebapp/asswords.props

that (probably) ;) doesn't exist.

justin

____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php
____________________________________


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



Reply via email to