vqServer GNUJSP

This page explains how to install GNUJSP and configure vqServer to work with GNUJSP.

Java Server Pages (JSP) are HTML pages which include Java source code and other special tags. The Java code is compiled and executed to generate the actual HTML page which the server sends to the browser. Java Server Pages were devised by Sun Microsystems.

GNUJSP is a free implementation of Java Server Pages which works well with vqServer. You can find out more about it and download it from the GNUJSP home page. You'll need to install a Java compiler to use GNUJSP.

GNUJSP has recently (October 1999) been upgraded to version 1.0 which is compliant with version 1.0 of Sun's JSP specification. GNUJSP version 1.0 requires vqServer version 1.9.22 or later, so you will probably need to update your vqServer installation. Using version 1.0 of GNUJSP with vqServer is a bit more difficult than using earlier versions. vqSoft is liasing with the GNUJSP authors with a view to simplifying the process.

In the following, website/ refers to the directory in which you originally installed vqServer. website/ is assumed to be in the root directory of your file system or hard drive. You'll need to replace \ by / and ; with : if your computer runs Linux or another UNIX-like operating system.

  1. Update your vqServer installation to version 1.9.22 or later. Earlier versions of vqServer don't work with the current version of GNUJSP. This is the easiest part of the process!
  2. Extract the GNUJSP distribution archive to your website/ directory. This results in the creation of a subdirectory, gnujsp-1.0.0/.
  3. Rename this new subdirectory to jsp/. This simple measure makes subsequent steps much easier.
  4. Create a subdirectory of jsp/ named scratchdir/.
  5. Start vqServer from a command prompt. As well as specifying vqServer's classes.zip, you'll need to add two of the files that come with GNUJSP,  jsp/lib/gnujsp10.jar and jsp/lib/servlet-2.0-plus.jar to the CLASSPATH part of the command line in that order, giving a command line something like java -classpath classes\classes.zip;jsp\lib\gnujsp10.jar;jsp\lib\servlet-2.0-plus.jar vq.server.console.
  6. Open the vqServer control centre in your browser.
  7. Click on Aliases under Main web server in the control centre menu and then on New alias to create a new alias. Fill in the boxes on the form as follows:
    • Alias: /servlet/jsp
    • Real name:org.gjt.jsp.JspServlet
    • Action: Run Java servlet

    Click the Ok button. Click the Ok button a second time if the form reappears. The updated list of aliases for the main web server appears.

  8. Find the new alias in the list and click on the icon in the Parameters column. You need to create two parameters, scratchdir, compiler with the following values:
    • scratchdir: /website/jsp/scratchdir
    • compiler: javac.exe -classpath %scratchdir%;classes\classes.zip;jsp\lib\gnujsp10.jar; jsp\lib\servlet-2.0-plus.jar -d %scratchdir% -deprecation %source% (you'll need to adjust this value to reflect the location and name of your own Java compiler).
  9. For convenience, create another alias to point to the examples bundled with GNUJSP. The following values are suggested:
    • Alias: /jspex/
    • Real name: jsp/examples/
    • Action: Serve file
  10. In the control centre menu, click on File types and then on New file type. Fill in the boxes on the form as follows:
    • File extension: jsp
    • Filter: /servlet/jsp

    Click the Ok button.

  11. Test your GNUJSP installation by typing http://hostname/jspex/date.jsp in your browser's address box and pressing the Enter key.

vqServer version 1.9. Copyright © 1997-99 Steve Shering and vqSoft. Last updated 24 October 1999.
Register (free!)