Discussion Locked

What is needed to run Java Servlets ?

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello, Iam in my first steps in Java Language, and Iam asking about what is needed to program and run Java Servlets,I know that I need the JSDK and the JDK, but there r some settings I think should be altered like the CLASSPATH or something like this... Iam not sure , I need full information about this subject ..
Thanks in Advance
Miss.Hanan Khader

10 replies

by hanankhader

Hi
Please, I need to know how I can run the servlets on my PC, I have installed the JDK1.3 and the JSDK, so what else is needed ?
Thanks in advance ...

by john.mallonee

Unfortunately, the answer to this question is not altogether simple. There are minimum requirements for running a servlet, namely a web server that supports running servlets and a servlet engine. Netscape has a web server (iPlanet) that you can download a developer copy of at www.iplanet.com. This includes support for servlets. You load the server to your local PC (for debugging) and it runs as a service (in Windows anyway). You will need to go into the web server administrator function and turn on java servlets and specify the directory where you will store them. You also specify a URL prefix for invoking your servlet from your web server. You will probably want a web server set up on a separate server machine to actually deploy your servlet after testing. There are certainly many details in this process, so looking at sites such as www.javasoft.com (Sun's java developer site) will prove valuable.

by don_raka

>>but there r some settings I think should be altered like the CLASSPATH or something like this... Iam not sure <<

The answer is : it depends on what servlet engine you're using. I mean the settings.
I'm using Resin (www.caucho.com), either in Linux or Windows. There's nothing about CLASSPATH need to be altered. But If you create a web-appz (that's how we call a clloection of servlet, JSP, and some other static resource altogether) and want to deploy it in your servlet engine (such as Resin) you need to create a simple descriptor file for that web-appz. It's typically defines mapping between servlet url (as it will be seen in the URL typed by user) and the class of that particular servlet. In earlier days of servlet, the format for this descriptor is different from one servlet engine to another servlet engine. deployment nightmare. But now they're (the have) converge to one standardized format, in XML. For more info , you should try installing one servlet engine (Tomcat, or Resin,etc), read the manual, code, compile, get it run. Good luck.

This discussion is closed to new replies.