Hello,
My application is under this path :
K:\jakarta-tomcat\webapps\Sylvie
and the file web.xml for this application is under this path :
K:\jakarta-tomcat\webapps\Sylvie\WEB-INF\web.xml
and contains these lines :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>ServletElt</servlet-name>
<servlet-class>ServletElt</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>Sylvie.properties</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ServletElt</servlet-name>
<url-pattern>/ServletElt</url-pattern>
</servlet-mapping>
</web-app>
And when I use the getInitParameter method in my sevlet ServletElt as following
// find the value of "properties" in the file web.xml - tag init-param
String propsFile = getInitParameter("properties");
I get "Sylvie.properties".
Hope this can help you.
roy woods a écrit :
> Hi all
>
> My getInitParameter() method returns nothing when It
> should return value. I am using Tomcat. I placed my
> web.xml in jakarta-tomcat-3.2/webapps/root/web-inf/ I
> have the parameter values in the web.xml. I even
> copied the one in the book core servlets and java
> serverpages and put in that dir but no result. what is
> cooking?
>
> should I put the web.xml file somewhere else? and if
> yes where?
>
> Thanks all
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html