File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to run servlet in Tomcat 4.0.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to run servlet in Tomcat 4.0.1" Watch "How to run servlet in Tomcat 4.0.1" New topic
Author

How to run servlet in Tomcat 4.0.1

jainnedra singh
Greenhorn

Joined: Apr 19, 2004
Posts: 7
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

Joined: Apr 26, 2004
Posts: 9
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

Joined: Mar 22, 2000
Posts: 12835
    
    5
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

Joined: Apr 19, 2004
Posts: 7
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

Joined: Jul 13, 2003
Posts: 87
Did you restart Tomcat after defining web.xml in the test\WEB-INF folder ?
jainnedra singh
Greenhorn

Joined: Apr 19, 2004
Posts: 7
Yes i have restarted my tomcat server.
i do't know why blank screen come sno eroor nothing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run servlet in Tomcat 4.0.1