File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Configuration file.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Configuration file.." Watch "Configuration file.." New topic

Configuration file..

Chuck Meduri
Ranch Hand

Joined: Nov 29, 2000
Posts: 48
I have just started learning Servlets and am using Resin1.2.1 as my servlet engine. I am trying to access the initialization parameter from a web.xml file which I placed in the /install-dir/doc/Web-inf/classes directory. My class file is in /install-dir/doc/Web-inf/classes/<package-name>/<classfile>.
When I run the servlet from Internet Explorer it cannot find the
parameter and hence prints a default message which I supplied in my code.
Can anybody help me with this problem.
Thank you in advance,
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
The Web.xml is pretty sensitive to syntax and the order of elements.
Here is an example that creates an alias and provides a single init paramater.
Incidently be sure that directory name is WEB-INF, all caps.

author of:
I agree. Here's the link:
subject: Configuration file..
It's not a secret anymore!