cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute a servlet on jakarta-tomcat-4.0.3

Former Member
0 Kudos

Please let me know how to execute a servlet on jakarta-tomcat-4.0.3 .I am able to compile it .

Regards,

Saurabh Singhal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Here is URL where there are step by step procedures to excute servelets.

http://www.theserverside.com/books/addisonwesley/ServletsJSP/index.tss

hope this free online book helps you a lot

Regards,

RK

former_member182670
Contributor
0 Kudos

Hi

You must provide a mapping in your web.xml configuration file. This mapping will allow you to access servlet via url in form: "http://[domain]:[port]/[context]/servlet/[servlet full qualified name]"

This file should be located at $TOMCAT_HOME/conf.

Sample web.xml contains:

<web-app>

<display-name>Sample Database App</display-name>

<description>

This is a simple application.

</description>

<servlet>

<servlet-name>MyServlet</servlet-name>

<servlet-class>MyServletImpl</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>MyServlet</servlet-name>

<url-pattern>/myservletaddr</url-pattern>

</servlet-mapping>

</web-app>

You can find more info at:

http://scitec.uwichill.edu.bb/cmp/online/CS36L/tutorials/TomcatIntroduction/TomcatIntroSampleApp.htm...

or

http://www.moreservlets.com/Using-Tomcat-4.html