TO RUN SERVLET IN TOMCAT 5.5
FIRST CREATE THE FOLDER STRUCTURE LIKE BELOW
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\
UNDER WEBAPPS FOLDER
\
PROJECT FOLDER NAME
\
index.jsp
index.html
web_inf
\
classes
web.xml
in servlet url pattern give as /servletname/*
In html form action="servletname" method="get or post"
create dsn in system dsn in sql server or any database you have
To compile the servlet
set the java path
set the classpath
in cmd prompt
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\s2s\WEB-INF\classes>set classpath=C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/servlet-api.jar;
press enter
javac servletname.java
go to Browser http://localhost:8084/
1.click manager give user and password if u donot know go to tomcat install.directory/conf/tomcat-users.xml u find there
2.click the project of yours and enjoy running servlet.