Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run servlet in tomcat 5.5
12-13-2011, 02:31 AM (This post was last modified: 12-19-2011 03:10 AM by rajasri.)
Post: #1
Tongue How to run servlet in tomcat 5.5
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.
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
Rainbow Simple Servlet Program mukesh1234 0 57 01-30-2012 12:32 AM
Last Post: mukesh1234
Big Grin In Tomcat jsp page is not refreshing rajasri 0 62 12-19-2011 10:41 PM
Last Post: rajasri
Exclamation captcha project in jsp/servlet rajasri 0 193 12-19-2011 10:14 PM
Last Post: rajasri
Photo Tomcat not starting error code 0 rajasri 0 165 12-14-2011 06:34 PM
Last Post: rajasri
Heart How to authenticate in a webapplication using jsp and servlet rajasri 0 274 12-13-2011 05:02 AM
Last Post: rajasri
Lightbulb Too many connection error in tomcat rajasri 0 159 12-13-2011 03:16 AM
Last Post: rajasri
Big Grin HTTP Status 404 - Servlet as is not available rajasri 0 338 12-13-2011 02:45 AM
Last Post: rajasri
Tongue Servlet example for printing random values rajasri 0 120 12-12-2011 11:18 PM
Last Post: rajasri
  Servlet example for printing random values admin 0 238 11-28-2011 11:00 PM
Last Post: admin

Forum Jump:


User(s) browsing this thread: 1 Guest(s)


WE will share important jobs and updates on facebook so like us to get updates