Developing Java Servlet and JSP in Voyager
by K. Yue
July 2002
Introduction
Voyager (dcm.cl.uh.edu) is the main server serving students in the division of Computing and Mathematics. Most commecial production Java servlet/JSP servers have few applications and have experienced developers. As a comparison, Voyager support hundreds of Servlet/JSP applications (one per student) to provide students with added flexibility. Furthermore, since many students are beginners and making mistakes are part of the learning, voyager is subjected to a much rougher environment.
To ensure the most effective use of Voyager, your cooperation is requested. This page describes how you can host Servlets/JSP in voyager effectively. The main Servlet/JSP server we use is JRun, which also supports EJB. We are also experiemnting with Tomcat (which does not fully support EJB at the current moment). JRun listens to the port 8100.
Directory Structures and URL Mapping
You should put your files in the right directory:
Directories | For storing |
Userhomedir\jrun\ | JSP files |
Userhomedir\jrun\WEB-INF\classes | Servlets and other User Java classes |
Userhomedir\jrun\WEB-INF\lib | User Java classes and beans |
Note that the Userhomedir is not the page subdirectroy (which is used by MS IIS).
URL for JSP applications:
http://dcm.cl.uh.edu:8100/ Example:
http://dcm.cl.uh.edu:8100/yue/jrun/test.jsp
which will invoke:
yue\jrun\test.jsp
URL of Java Servlets:
http://dcm.cl.uh.edu:8100/<userid>/jrun/servlet/<servletname>
Example:
http://dcm.cl.uh.edu:8100/yue/jrun/servlet/SimpleServlet
will invoke
yue\jrun\WEB-INF\classes\SimpleServlet.class