![]() |
INICOM, |
Business
Development Technology Consulting Language Translation |
Environment: Cobalt RaQ3, apache 1.3.6 with mod_so
Installation includes: ClasspathX_Servlet, Jikes, ApacheJServ 1.1, GNUJSP
Install from the following URL's:
ftp://ftp.cobaltnet.com/pub/developer/Apache/i386/ClasspathX_Servlet-1.1-1.i386.pkg
ftp://ftp.cobaltnet.com/pub/developer/Apache/i386/ApacheJServ-1.1-1.i386.pkg
Jikes is a better java compilier from IBM. Get it from http://www10.software.ibm.com/developerworks/opensource/jikes/project/stable/jikes-1.06-1.i386.rpm and install byrpm -Uvh jikes-1.06-1.i386.rpm
Add "Include /etc/httpd/conf/jserv/jserv.conf" to the end of the /etc/httpd/conf/httpd.conf file, change owner/group of /usr/logs to httpd:httpd and restart Apache by apachectl restart
use a web browser to go to http:///servlets/Hello A page should come up saying
Example Apache JServ Servlet Congratulations, ApacheJServ 1.1 is working!from the same machine, you can open a browser to display the status of JServ at http://localhost/jserv
If you want to check it from other systems, you must modify the permissions in the /etc/httpd/conf/jserv/jserv.conf file.
get from http://www.klomp.org/gnujsp/downloads/gnujsp-1.0.0.tar.gz and install bycd /usr/local; tar xzvf gnujsp-1.0.0.tar.gz cp /etc/httpd/conf/jserv/zone.properties /etc/httpd/conf/jserv/alph.propertiesIn the alph.properties file, change the list of repositories to:repositories=/usr/local/gnujsp-1.0.0/lib/gnujsp10.jar repositories=/usr/local/gnujsp-1.0.0/lib/servlet-2.0-plus.jarand add these to the Servlet Aliases section:servlet.gnujsp.code=org.gjt.jsp.JspServlet servlet.gnujsp.initArgs=checkclass=true,pagebase=/home/httpd/html/, scratchdir=/var/local/apache/jsp,debug=true,compiler=builtin-javac -classpath %classpath%:%scratchdir%: /usr/local/gnujsp-1.0.0/lib/servlet-2.0-plus.jar: /usr/local/gnujsp-1.0.0/lib/gnujsp10.jar -d %scratchdir% -deprecation %source%If using jikes, the initArgs line should read:servlet.gnujsp.initArgs=checkclass=true,pagebase=/home/httpd/html/, scratchdir=/var/local/apache/jsp,debug=true,compiler=/usr/bin/jikes -classpath %classpath%:%scratchdir%: /usr/local/gnujsp-1.0.0/lib/servlet-2.0-plus.jar: /usr/local/gnujsp-1.0.0/lib/gnujsp10.jar:/usr/local/jdk1.2.2/jre/lib/rt.jar -d %scratchdir% -deprecation %source%If it isn't obvious, the servlet.gnujsp.initArgs lines are a single line, not multiple lines as above shown for clarity! Change the "zones=root" line in the jserv.properties file to include the newly create "alph" zone, e.g. zones=root,alph
and add a line to point to the properties file such as alph.properties=/etc/httpd/conf/jserv/alph.propertiesadd to the /etc/httpd/conf/jserv/jserv.conf file:
ApJServAction .jsp /alph/gnujsp ApJServMount /alph /alphMake sure that the log files and scratch directory selected exist. Also verify that all .jar files are where you said they are. Restart Apache by apachectl restart
Copy the example files from the gnujsp/examples directory to a directory such as "myexamples" under your apache document root.in a browser, try bringing up a file such as http://yourhost/myexamples/hello.jsp
You should get the Congratulations message. If you don't, go back and check the paths, syntax errors, etc.
Unfortunately, the error logs are going to be fairly cryptic if you have a problem. Look at the jserv.log and mod_jserv.log files and you may get sufficient hints to correct any issues.