Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run Servlets?

 
Anil Kollur
Ranch Hand
Posts: 101
Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Everybody,
I am using a Win98 machine and I have J2SDK means I have the ServletRunner, can anybody tell me how to run the Servelets.
Thanks in advance,
Anil
 
prakash muthu
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
a batch file in the name of Startserver.bat will be there.
That file is for starting a server.
Let me know if you want more details
 
Anil Kollur
Ranch Hand
Posts: 101
Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! ,
I am having the Apache web Server and I can start the server from the command line, but what for Startserver.bat file? I could not able to understand, please help me.
One more thing, I am having Java Servlet Dev kit(JSDK)and Apache web server as said earlier, is it enough to start the Servlets?
Thanx in advance
Anil
 
Amit Roy
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thr
First of all u need to need to set the classpath properly as u are using a windows 98 operating sys set ur class path to
c://jsdk1.2/bin/servletrunner (configure it as it is installed in ur machine) Then after compiling ur servlet
1) Place it in your class file in the examples directory.
2) Start the servletrunner by typint the command "servletrunner"
from the dos prompt it will start on port no 8080(default)
3) open ur browser and type in http://localhost:8080/servlet/urclassfilename
hope this helps
Amit
 
Max Hunt
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want use a servletrunner... I be the download of J2sdk 1.4(the last version founded in java site) and I�m don�t have a servletrunner in directory /bin... where I can find the servletrunner.exe ???
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
j2sdk1.4 is for J2SE. It is the standard java libraries, and has nothing to do with Servlets or JSP.

As for servlet runner, it is VERY old technology and you should NOT try to find it or use it.

Tomcat is what you want these days, and it's easy to find from java.sun.com/servlets (or jakarta.apache.org/tomcat )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic