Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 1998 14:04:19 +0100 (BST)
From:      Tim Shuttleworth <tim@mcc.ac.uk>
To:        freebsd-java@FreeBSD.ORG
Subject:   Re: servlet capable server, jdk1.2beta?
Message-ID:  <E0yJeEd-0001dr-00@fysh.mcc.ac.uk>
In-Reply-To: <199803301108.DAA01943@northwest.com> from Stephen Wynne at "Mar 30, 98 03:08:02 am"

next in thread | previous in thread | raw e-mail | index | archive | help
You write:
> In message <199803301103.NAA01080@gilberto.physik.RWTH-Aachen.DE>,
> Christoph Kukulies writes:

>     I'm trying to experiment with servlets. Is there any 
>     servlet capable web server for FreeBSD available?

> I haven't tried this, but you might check out JServ for Apache. See
> http://java.apache.org/ for more details. Let us know how it goes! 
> (I'm not saying that you won't get a better answer from someone else.)

I've used JServ successfully with FreeBSD, and I've even made a few notes for
myself on how to do it, which I include below. There is a mistake in these
notes (just to keep you on your toes), as I forgot to include a step, but
it's pretty obvious what it is when you get to it (and I've forgotten what it
is, so I can't put it back in. If anyone tries this, can they mail me so I can
update my notes?)

Anyway, I've not taken JServ much beyond this, so I can't comment on how it
copes with more complex servlets, but it certainly seems to do its basic job.

My notes are as follows:

Add GNU make package (or port)

Install JDK 1.1.5 in /usr/local/jdk1.1.5
(Add /usr/local/jdk1.1.5/bin to $PATH for all relevant users (root+me))

Install jserv sources into /usr/local/src/jserv

Install Apache port into /usr/ports/www/apache

cd /usr/ports/www/apache
make patch
cd work/apache_1.2.4/src
cp /usr/local/src/jserv/jserv0.9.10/mod_jserv.c .
chmod 644 mod_jserv.c
add the following to file "Configuration" (as first module):
	Module jserv_module	mod_jserv.o
make install

edit /usr/local/etc/apache/httpd.conf and add:

---- SNIP ----
ServerName "whatever@wherever"

# JSERV Settings
#
# ServletBinary: location of the java interpreter

ServletBinary /usr/local/jdk1.1.5/bin/java

# ServletBinaryArgument: arguments for the java interpreter.
# Example sets start and maximum heap sizes.

#ServletBinaryArgument -ms8m -mx16m

# ServletClassPath: locations where classes required by the servlets
# reside. The default entries are for the JDK classes, the JSDK classes
# and the Java-Apache specific classes.

ServletClassPath /usr/local/jdk1.1.5/lib/classes.zip
ServletClassPath /usr/local/etc/apache/jserv/lib/servclasses.zip
ServletClassPath /usr/local/etc/apache/jserv/classes

# ServletErrorLog: file to direct System.err output from servlets
# I'll set this here to make finding errors easier (not having to look

# at other server errors that may occur).

ServletErrorLog /var/log/servlet-errors.log

# ServletPort: Port for the Java Servlet Interpreter to run on.
ServletPort 8007

# ServletProperties: location of the Servlet properties file which
# can be used to set various properties for servlets, and to specify
# which servlets should start by default.
ServletProperties /usr/local/etc/apache/jserv/servlet.properties

# ServletAlias: tells apache where servlets live
ServletAlias /servlets /usr/local/etc/apache/jserv/servlets

# The following adds support for the <SERVLET>...</SERVLET> tag in
# documents (allowing dynamic documents)
AddHandler jhtml-parser .jhtml
Action jhtml-parser /servlets/org.apache.jserv.JServSSI
---- SNIP ----

cd /usr/local/src/jserv/jserv0.9.10
mkdir doc
javadoc -classpath /usr/local/jdk1.1.5/lib/classes.zip:/usr/local/src/jserv/jserv0.9.10/servclasses.zip:/usr/local/src/jserv/jserv0.9.10/src -d doc org.apache.jserv
gmake
gmake install

cp servlet.properties /usr/local/etc/apache/jserv

edit /usr/local/etc/apache/jserv/servlet.properties and add (in the Servlet
Aliases section):

servlet.envdump.code=org.apache.jserv.EnvDumpServlet

start apache: /usr/local/sbin/apache -f /usr/local/etc/apache/httpd.conf

telnet to port 80 (or use netscape) and
	GET /servlets/envdump HTTP/1.0

Cross fingers!


-- 
                          Dr Tim Shuttleworth
                       Network Support Programmer
                          Manchester Computing
                   email: Tim.Shuttleworth@mcc.ac.uk

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0yJeEd-0001dr-00>