WEB.XML's <load-on-startup> does not run on Tomcat 4

V

vunet.us

Hello,
My web.xml works fine on Tomcat 4. But when I added new servlet (see
code below between comments), it stopped working because of <load-on-
startup>1</load-on-startup>. However, Tomcat 5 runs my new web.xml
with these changes without any problems. So, there is something with
<load-on-startup> addition that causes error. Please, suggest. Thank
you.

<!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>
<!-- Added Below -->
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>direct.myServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/servlet/direct.myServlet</url-pattern>
</servlet-mapping>
<!-- Added Above -->
</web-app>
 
V

vunet.us

Hello,
My web.xml works fine on Tomcat 4. But when I added new servlet (see
code below between comments), it stopped working because of <load-on-
startup>1</load-on-startup>. However, Tomcat 5 runs my new web.xml
with these changes without any problems. So, there is something with
<load-on-startup> addition that causes error. Please, suggest. Thank
you.

<!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>
<!-- Added Below -->
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>direct.myServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/servlet/direct.myServlet</url-pattern>
</servlet-mapping>
<!-- Added Above -->
</web-app>

I guess it is not the easiest thing to tell... huh.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top