GnuJSP 0.9.0

GnuJSP is a free implementation of Sun's Java Server Pages. Once the GnuJSP servlet is correctly installed, files with the extension .jsp are translated into java source files, compiled, and ran. This is an early release, intended for the adventurous. The <BEAN> tag is not supported yet, and documentation is scarce, but you should be able to experiment with this exciting new technology!

Intallation

GnuJSP has been tested with the following servlet engine/web server/OS combinations:

Once more combinations have been tested (and more time has been spent on writing this), I want to have nice step-by-step installation guides here. For now, I will describe the general idea:

  1. download the latest version of GnuJSP.
  2. unpack the downloaded file.
  3. add the GnuJSP class files (nl/nmg/jsp/*.class) to your servlets directory.
  4. create a directory to store the generated java and class files, that can be written by the servlet engine.
  5. configure the GnuJSP servlet like this:
    servlet.jsp.code=nl.nmg.jsp.JSPServlet
    servlet.jsp.initArgs=classfiles=
    <dir for generated files>
  6. associate the extension .jsp with the newly configured servlet jsp.

Please note that you need JDK1.1 (or higher) to run GnuJSP. JRE will not suffice, becuase Sun's java compiler is called directly. Future versions may change this.

Developing

GnuJSP follows the emerging JSP standard (I know of no publicly available place where the standard can be viewed. If anybody does, please let me know). Currently the <BEAN> tag is not supported, and neither are the methods added to com.sun.server.http.HttpServiceRequest and com.sun.server.http.HttpServiceResponse.

Inspired by JRun, I have added the <%@ include="<file>" %> directive. The specified file can be specified relative to the JSP file containing it. The <%@ vinclude="<uri>" %> directive has not been added.

GnuJSP automatically detects changes to a JSP file (and the JSP files it includes), and recompiles the JSP file if necessary. The JSP parser tries to make the best of your JSP file and does not generate any syntax errors, but javac may. Javac error messages are presented as-is in the browser window. A look at the generated java file may be needed to figure out what's going on.

Feedback

I'm very interested to hear what people think about GnuJSP and I'd like to hear about any problems you may be having with it, or suggestions you might have. Please email me at vinny@nmg.nl and check the webpage at http://www.nmg.nl/~vinny/gnujsp/ for the latest version.

Version history

Version 0.9.0 (27 Aug 98):

Todo

Copyright

This software is distributed under the terms of the GNU Public License. Please see the file COPYING included with the distribution for details.