Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat 5.5 cannot find a servlete

Status
Not open for further replies.

Vadim

Programmer
Feb 5, 2002
75
US
I've got status error 404 for this address:

Same address works fine on Tomcat 4.1 but on my new computer with Tomcat 5.5.9 did not. Actually it did not found any servlet.
I checked - this link exist. Real address is:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\dcfrtbill\DcFrtBill.class

What is missing?
 
You should map your servlet in your applications web.xml :

<servlet>
<servlet-name>DcFrtBill</servlet-name>
<servlet-class>dcfttbill.DcFrtBill</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>DcFrtBill</servlet-name>
<url-pattern>/servlet/dcfrtBill.DcFrtBill</url-pattern>
</servlet-mapping>

This would get it running as is - but I would actually map it like this personally :


<servlet>
<servlet-name>DcFrtBill</servlet-name>
<servlet-class>dcfttbill.DcFrtBill</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>DcFrtBill</servlet-name>
<url-pattern>/servlet/DcFrtBill</url-pattern>
</servlet-mapping>

and then use the following URL to call it :

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top