aspose file tools*
The moose likes Servlets and the fly likes How to run a Servlet using java web server 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 a Servlet using java web server" Watch "How to run a Servlet using java web server" New topic
Author

How to run a Servlet using java web server

s manchika
Greenhorn

Joined: Jan 21, 2004
Posts: 5
I have compiled the servletcode(Hello.java) and put Hello.java and Hello.class in D:\Sun\jswdk-1.0.1\examples\WEB-INF\servlets directory
I started java web server 1.0.1 using startserver batch file ,server started successfully then i typed in browser
http://localhost:8080/examples/servlet/Hello
it says page cannot be displayed.

I tried adding the code ,Hello.code=Hello, in servlets.properties file in "D:\Sun\jswdk-1.0.1\examples\WEB-INF" directory
still i am getting the same error..
Pls let me know what other things do i need to take care.
Thanks in advance.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

First, do yourself a huge favour and get a newer server.

jswdk1.0.1 is (in internet terms) a dinosaur.

http://jakarta.apache.org/tomcat is what you want.
s manchika
Greenhorn

Joined: Jan 21, 2004
Posts: 5
Thank you Mike.
As per your advice i have downloaded Tomcat and am able to run servlets.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run a Servlet using java web server