Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to run a Servlet using java web server

 
s manchika
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Mike.
As per your advice i have downloaded Tomcat and am able to run servlets.
 
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!