WebSTAR 4 Manual & Technical Reference

Manual Contents | Chapter Contents | Previous Page | Next Page

WebSTAR JRun Servlet Runner

The WebSTAR JRun Servlet Runner allows you to use Java server-side applications known as servlets . Because servlets are platform-independent, you can use the growing number of free, shareware and commercial servlets without having to make any changes. Servlets can perform many tasks such as database access, text processing, and more.

For an explanation of how servlets can fit into your server design, see the JavaSoft white papers at:

 
http://www.javasoft.com/marketing/collateral/servlets.html

 
http://www.javasoft.com/products/servlet/index.html

System Requirements & Configuration

The WebSTAR JRun Servlet Runner requires at least 20 MB of installed RAM, and MRJ (Mac OS Runtime for Java) version 2.1.1 or greater. It supports version 2.1 of the Java Servlet API. You can test your installation by running one of the examples in the Apple Applet Runner.

The JRun folder must be in your WebSTAR root folder, and only the WebSTAR JRun Servlet Runner file belongs in the Plug-Ins folder.

.Using WebSTAR JRun Servlet Runner

WebSTAR does not install the WebSTAR JRun Servlet Runner Plug-In by default. Use the WebSTAR Server Suite Installer to install it. It does not require any additional RAM.
The JRun Servlet Runner is always enabled, and will be called any time you have a URL that includes the string
/servlet/ . This is not the same as the servlets folder.

The WebSTAR JRun Servlet Runner works with Apple's MRJ to run servlets (server-side applications) written according to the JavaSoft specifications. It allows you to run Java-language software on the server rather than the client side, and does not require Java support in the browser.

Using a Java servlet is easy: WebSTAR will automatically direct all URLs with the string " /servlet/ " before the name to the WebSTAR JRun Servlet Runner Plug-In. This is the standard way to call Java servlets on all platforms. The JRun Servlet Runner acts as a filter, changing the name so that it appears in your log file with a .servlet suffix. The WebSTAR suffix mapping then calls the JRun Servlet Runner, which uses MRJ to run the corresponding servlet in the servlets folder in the WebSTAR folder.

As long as the Servlet was written with the correct Java libraries, it will run on the server and return the results to the browser as HTML, GIF, or another web format.

There are some useful Servlet examples in the Tools and Examples folder. Use a URL like this:

http://www.domain.com/Tools%20&%20Examples/JRun/htdocs/

(replacing www.domain.com with your host name), to see the list of examples.

available Java Servlets, search the StarNine Extending WebSTAR listings . For information about using JRun, JRun Pro and servlet development, contact Live Software at

http://www.livesoftware.com

Java Servlet Tips

 
http://www.domain.com/servlet/HelloWorld
The JRun Servlet Runner is case-sensitive, so the case of URL must match the servlet name exactly . A URL with " helloworld " would not match a servlet file named HelloWorld.
  • The servlet must be in the servlets folder in the JRun folder in the WebSTAR root folder.
  • Java Servlet Development Information

    For more information, see Developing Java Servlets for WebSTAR and the examples in the Tools & Examples folder.


    Manual Contents | Chapter Contents | Previous Page | Next Page