• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run servlet in Tomcat 4.0.1

 
jainnedra singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As i want to run a simple "Hello World" servlet in Tomcat 4.0.1,But
Unfortunately i am not able to do so.If any body has idea plz let me know.
Thanx.
Jainendra
 
Himanshu Pathak
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to have a look at the tomcat documentation.
visit
Application Developer's Guide
Cheers.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that we have a Tomcat forum - go there and scan the last couple of weeks of posts, where you will probably find the answer to your problem.
Bill
 
jainnedra singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Himanshu,
Thanx for the url which u hace given me.As i have done that thing but still my servlet is not running.I am writing my process so that u will find the Mistake.
Step1::I made a directory webapps/Test
Step2::Now i made changes in conf/server.xml file with
<Context path="/test" docBase="Test" debug="0" reloadable="true"/>
Step3::Now i put my servelet classs file in /Test/web-inf/classes Directory.
Step 4::I made web.xml and put it into Test/web-inf directory with content as---->>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>Test.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
Step 5::run the servlet
http://192.168.2.133/test/HelloWorld
But i get a blan white screen.
Plz suggest me where i am wrong.
 
Gert Cuppens
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you restart Tomcat after defining web.xml in the test\WEB-INF folder ?
 
jainnedra singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i have restarted my tomcat server.
i do't know why blank screen come sno eroor nothing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic