Edit Edit

Java Servlet FAQ

How do you install a servlet on the JavaServer Web Development Kit(JSWDK)?

1) Copy your servlet's .class or .jar file to the \servlets directory where you installed the JSWDK:


2) If your servlet requires init parameters, use a text editor to edit the servlet.properties file in the directory:


Add the following lines to your servlet.properties file:


where MyServlet is your servlet .class file's base name, initarg1 is the name of the first init parameter and value 1 is the value of the first init parameter, etc.

3) Restart the web server by running the startserver.bat file in your JSWDK directory

4) Invoke the servlet by running your Web browser and typing the URL in the following format:


For example, if your web server is running on your local machine, use


or if you registered your servlet in the servlet.properties file, use


Last updated 12/27/1999 09:01:18 PM