Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Oct 2000 21:56:18 -0700
From:      UCTC Sysadmin <support@transbay.net>
To:        Derrick Ryalls <ryallsd@home.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Installing Apache Java Servlets
Message-ID:  <39FBADF2.53655FAA@transbay.net>
References:  <02bf01c04145$472a3070$0200a8c0@bartbox>

next in thread | previous in thread | raw e-mail | index | archive | help
> Derrick Ryalls wrote:
> 
> I could not find the method in the archives, so I hoped that someone has experience with this...
> 
> I am running an Apache web server v1.3.12 on freeBSD v4.1 or greater.  I thought it might be interesting to try
> running some servlets/jsp pages.  I tried doing the 'make' in the /usr/ports/java/jsdk path, but I got errors in the
> install.  I then found the /usr/ports/www/apache-jserv path and tried a make there.  The error on that one was:
> <Quote>
>  You must a fetch the Java Servlet Development Kit 2.0
>  (for Unix) archive from
> 
>      http://java.sun.com/products/servlet/download.html
> 
>  And copy into /usr/ports/distfiles
> </Quote>
> 
> However, when I go there they only seem to have jsdk2.1 version available, and the unfound file on install is
> 'jsdk20-solaris2-sparc.tar.Z'
> 
> Do I need to hotwire something/update something to get this to work?  Any input would be appreciated, especially is
> someone has some step by step instructions on how to get servlets working...  Thank you in advance.
> 
> -Derrick

You do download those exact files, despite it not seeming appropriate.
I installed servlet support for apache 1.3.9 and it passed its test.
If you follow the instructions closely it works. Documentation is at
www.apache.org/jserv, as I recall.

It makes some sense because (as I intuit) the Jserv stuff is rather self-contained,
and the Solaris thing contains just classes that work okay as they are in conjunction
with the Jserv engine.
I installed the latest jdk1.1.8 and jre and everything else, probably unnecessarily,
and hoped for the best and although there were several steps I didn't run into any
showstoppers. There appeared to be a mismatch between where the JSDK .jars were installed
and where they were looked for, and in impatience I copied them bodily to where they were
expected to be found and that fixed that. That had to be done to fix a broken compile
in a step near the end. The error messages were enough info to know what to do.
(You do have to find the JSDK jar files after they are installed, and I don't grok
the directory layouts and placements of the various Java components - worse than Perl
used to be. Stuff all over the place, not clear how anything finds anything since there
seem to be three different places .jar files end up.)

The documentation makes a lot of noise over security, and the defaults are not secure,
but I couldn't see what was expected concerning keys (in the scant reading I did)
so I passed on that for the time being. I couldn't tell if I was supposed to
generate encrypted keys or not, and using what if so. I gathered the user (whose
jsp code is to execute) has to have a local key file with a key to match but I didn't
see what, how or where. ++RTFM.

You have to edit the jserv config file (local tailoring) before you (re)fire apache up.
You have to manually edit the apache config file to list the Jserv modules to be used
(I didn't build apache from scratch with Jserv along, but added it to my existing system.)
I added the module references I think at the end of the other modules, hoping it wouldn't
cause a sequencing problem.
I didn't add reference to .jsp filetype in the apache config, presumably the code when
it runs on apache (re)start adds the .jsp filetype as a known thing through a function
call to apache. The test supplied with the install code works, so that suggested .jsp
became a known type, but I didn't check if it was a .jsp file that got executed.

The files controlling jserv by untweaked default went to a jserv directory created in
/usr/local/etc/apache. The one dumb default that should be changed IMHO is that jserv
puts its logs in /usr/local/logs, I think they should go in /usr/local/etc/apache
somewhere or accompany the server logs, since /usr/local/logs is an orphan as is (only
jserv uses it.) That is configurable though.

If you need more help bug me privately and if I'm lucky I can find the documentation
I used to get it all accomplished.

-ecsd@transbay.net


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39FBADF2.53655FAA>