|
|
Configuration questions... |
>Redhat 5.2, Linux 2.2.1
>Apache 1.3.4 + ssl
>JServ 1.0b3
>
>I have been trying to get JServ SSI to work with my setup, but I haven't
>quite got it right. I got the JServSSI jar file made, and I've created a
>servlets zone. All that works right. I have added "AddType" and
>"AddHandler" statements for .jhtml files in both the Apache conf and JServ
>conf files but nothing I do seems to work. I either get a 404 error, a 500
>error, or the connection times out. My question is what is the proper
>configuration for the .jhtml setup? Do I put the AddHandler statement into
>my httpd.conf file and not into jserv.conf, do I put it both places? The
>.jar file is included in the source path, but I get this 404 error when I
>try to get the .jhtml file "(ERROR) ajp11: Servlet Error:
>ClassNotFoundException: org.apache.ssi.SSIServlet". Do I need to move the
>.jar file into the servlets directory? Or do I have a different
>configuration error?
I did this just days ago. Maybe what I did will help.
In jserv.conf, I added
ApJServAction .jhtml /servlet/org.apache.jservssi.JServSSI
to point to my servlet zone.
In jserv.properties, I added
wrapper.classpath=/usr/local/Apache-JServ-SSI/src/ApacheJServSSI.jar
to add ApacheJServSSI to my classpath.
I've tried that with Example 2-4 from Jason Hunter's book. The times.jhtml
runs from a directory that does *not* have SSI privelages. That *might* be
a bug. Also, I get a NullExceptionPointer on the first SERVLET tag
though I modified Hunter's code:
From:
String zone = req.getParameter("zone");
if (zone != null) {
TimeZone tz = TimeZone.getTimeZone(zone);
df.setTimeZone(tz);
}
To:
String zone = req.getParameter("zone");
TimeZone tz;
if (zone != null) {
tz = TimeZone.getTimeZone(zone);
}
else {
tz = TimeZone.getDefault();
}
Finally, I see no signs of the "Known Bug" cited in the JServSSI docs:
"Currently, the parameters set for the first servlet on a page will still
be set in the next servlet."
--------------------------------------------------------------------------
Thad Humphries "'Open Systems' means no fences. And
Software Engineer (aka, Nerd) no fences means no need for Gates."
Phone: 540/675-3015, ext. 225 - Sun Microsystems | |
| I am running Apache (1.3.3) on Linux (RH 5.1). I have found several things I had to change from the default or instructions in the book to get JServSSI to work:
1) Make sure the class name in the ApJServAction .jhtml ... line in the master properties file (jserv.properties in my case) is org.apache.jservssi.JServSSI. The last two items in the default were incorrect. 2) I can either include the ApacheJServSSI.jar in my classpath, or I can point to it in a repositories statement in my zone properties file for the zone indicated by the ApJServAction line in the master properties file. Either (or both) seem to work. 3) When passing parameters from the called servlet to the .jhtml file, put the parameters in quotes in the .jhtml file, like so:
<PARAM NAME="name" VALUE="doug">
otherwise I get a NullPointerException when I call GetParameter.
4) I also tried putting the "jar" file with JServSSI in it into my classpath, and referencing it in jserv.properties like this: ApJServAction .jhtml org.apache.jservssi.JServSSI - without the zone, and it would not work. I had to use a zone. | |
| Subcategories:
Answers in this category:
| |
| [Add a New Answer in "Configuration questions..."] |
| Previous: |
|
| Next: |
|
| ||||||||||