精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Java>>JAVA编程>>JSP/Servlet>>JAVA服务器配置与使用>>Apache+JServ+ojsp+SSL+PHP(IMAP+LDAP+MY

主题:Apache+JServ+ojsp+SSL+PHP(IMAP+LDAP+MY
发信人: netcharm()
整理人: zjxyz(2001-05-01 09:55:22), 站内信件
Apache+JServ+ojsp+SSL+PHP(IMAP+LDAP+MYSQL) Install Guide

在参考java区netsoldier的"jsp已经稳定运行起来"
和laomie的gnijsp的安装,配置两篇文章
经过2天的不懈奋斗,终于可以正常工作了。:)

感谢两位前辈!

现把安装过程简略描述如下,和大家共享喜悦。


PS1:OS环境:RedHat 6.2 kernal:2.2.14-5
    MEM:256MB

PS2:我的PHP4,JServ都是编译进Apache的
   没有采用mod方式.

前期准备:

软件:
Apache 部分:
Apache 1.3.12        http://www.apache.org
Apache JSSI 1.1.2    http://java.apache.org
Apache JServ 1.1.2   http://java.apache.org

SSL 部分:
mod_ssl-2.6.0-1.3.12 http://www.modssl.org/source/mod_ssl-2.6.0-1.3.12
.tar.gz
mm-1.0.9             http://www.engelschall.com/sw/mm/mm-1.0.9.tar.gz

rsaref2.0            ftp://ftp.replay.com/pub/crypto/crypto/LIBS/rsare
f20.tar.Z
openssl 0.9.4        http://www.openssl.org/source/openssl-0.9.4.tar.g
z

PHP 部分:
PHP 4.0.1pl2         http://www.php.net/do_download.php?download_file=
php-4.0.1pl2.tar.gz&source_site=www.php.net
libwmf 0.1.7         http://www.csn.ul.ie/~caolan/publink/libwmf/libwm
f-0.1.17.tar.gz
freetype 1.3.1       ftp://ftp.freetype.org/pub/freetype1/freetype-1.3
.1.tar.gz
zlib 1.1.3           http://www.cdrom.com/pub/infozip/zlib/zlib.tar.gz

pdflib 3.0           http://www.pdflib.com/pdflib/download/pdflib-3.0.
tar.gz
openldap 1.2.8       ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-rele
ase/openldap-1.2.8.tgz
imap 4.5             http://hkstar.Linuxberg.com/files/console/imap-4.
5.tar.Z

JAVA
jdk 1.2.2            http://java.online.sh.cn/JDK/Sun/Linux/jdk1_2_2-l
inux-i386.tar.gz
jsdk 2.0             http://java.sun.com 选择 solaris and other unix
jswdk 1.0.1          http://java,sun.com 选择 solaris and other unix
ojsp                 http://technet.oracle.com 搜寻 ojsp_10061.otn.zip


安装:
Apache+JServ+PHP:
由于这些东西的参数较多
我采用每个建立一个cfg脚本配置,不用每次重新配置都要敲入所有配置参数:)


步骤:

拷贝所有的包到/tmp下面,然后按步骤解开压缩包,最方便的是用mc来拷贝:)
注意:以下路径均为我本机的路径,以mc操作,后面的配置文件也以此为参考
     mc可以直接进入tar以及gz包,然后就可以直接F5(Copy)了。

# mc (change left win to /tmp,right to /opt/install)
01. mm-1.0.9.tar.gz                     to /opt/install/lib/mm/mm-1.0.
9
02. rsaref20.tar.Z                      to /opt/install/lib/rsa/rsaref
20
03. openssl-0.9.4.tar.gz                to /opt/install/lib/openssl-0.
9.4
04. mod_ssl-2.6.0-1.3.12.tar.gz         to /opt/install/apache/mod/mod
_ssl-2.6.0-1.3.12

05. openldap-1.2.8.tgz                  to /opt/install/ldap/openldap-
1.2.8
06. imap-4.5.tar.Z                      to /opt/install/mail/imap-4.5

07. pdflib-3.0.tar.gz                   to /opt/install/pdf/pdflib-3.0

08. zlib.tar.gz                         to /opt/install/pdf/zlib-1.1.3

09. libwmf-0.1.17.tar.gz                to /opt/install/lib/wmf/libwmf

10. freetype-1.3.1.tar.gz               to /opt/install/lib/freetype.t
tf/freetype-1.3.1

11. jdk1_2_2-linux-i386.tar.gz          to /usr/local/jdk1.2.2
12. jsdk20-solaris2-sparc.tar.Z         to /usr/local/JSDK20
13. jswdk1_0_1-solsparc.tar.Z           to /usr/local/jswdk-1.0.1
14. ojsp_10061_otn_zip                  to /usr/local/ojsp

15. apache_1.3.12.tar.gz                to /opt/install/apache/apache_
1.3.12
16. ApacheJSSI-1.1.2                    to /opt/install/apache/ApacheJ
SSI-1.1.2
17. ApacheJServ                         to /opt/install/apache/ApacheJ
Serv-1.1.2
18. php-4.0.1pl2                        to /opt/install/php/php-4.0.1p
l2

配置文件
注意:没有特别说明的就是用的缺省的configure没有任何参数。
     所有cfg文件都需要由执行属性。

[root@info install]# cat /opt/install/php/php-4.0.1pl2/cfg
./configure \
  --enable-force-cgi-redirect \
  --with-apache=../../apache/apache_1.3.12 \
  --with-pdflib=/usr/local \
  --with-zlib-dir=/usr \
  --with-jpeg-dir=/usr/local \
  --with-tiff-dir=/usr/local \
  --with-mysql=/usr/local/mysql \
  --without-gd \
  --enable-magic-quotes \
  --disable-debug \
  --enable-ftp \
  --with-dbase \
  --with-zlib=/usr \
  --with-imap=/usr/local/imap \
  --with-ldap \
  --with-java=/usr/local/jdk
#  --with-servlet=/usr/local/jsdk \  
(上面一行千万不要加,我开始加的,PHP可以编译通过不过无法河apache整合)

[root@info install]# cat lib/mm/mm-1.0.9/cfg
./configure --disable-shared

[root@info install]# cat lib/openssl/openssl-0.9.4/cfg
./config \
     --prefix=/usr/local/openssl \
     --openssldir=/usr/local/openssl \
     -L`pwd`/../../rsa/rsaref2.0/local rsaref \
     -fPIC 

[root@info install]# cat apache/ApacheJServ-1.1.2/cfg 
#!/bin/sh
./configure \
  --prefix=/usr/local/apache/jserv \
  --with-apache-src=../apache_1.3.12 \
  --with-logdir=/usr/local/apache/log \
  --enable-EAPI \
  --with-jdk-home=/usr/local/jdk \
  --with-JSDK=/usr/local/jsdk/lib/jsdk.jar \
  --disable-debugging

[root@info install]# cat apache/mod/mod_ssl-2.6.0-1.3.12/cfg4 
#!/bin/sh
./configure \
  --with-apache=../../apache_1.3.12 \
  --with-ssl=/usr/local/openssl \
  --with-rsa=../../../lib/rsa/rsaref2.0/local \
  --with-mm=../../../lib/mm/mm-1.0.9 \
  --prefix=/usr/local/apache \
 --disable-rule=SSL_COMPAT \
 --enable-rule=SSL_SDBM \
 --enable-rule=SSL_EXPERIMENTAL \
 --enable-rule=SSL_VENDOR \
 --activate-module=src/modules/php4/libphp4.a \
 --activate-module=src/modules/jserv/libjserv.a

编译安装:

步骤:

# ln -s /usr/local/jdk1.2.2     /usr/local/jdk
# ln -s /usr/local/JSDK20       /usr/local/jsdk
# ln -s /usr/local/jswdk-1.0.1  /usr/local/jswdk
# ln -s /usr/local/jdk1.2.2/jre /usr/local/jre
# vi ~/.profile
  添加 classpath 环境变量 

JDK_LIB=/usr/local/jdk/lib
JSDK_LIB=/usr/local/jsdk/lib
JSWDK_LIB=/usr/local/jswdk/lib

classpath=$JDK_LIB/rt.jar:$JDK_LIB/tools.jar:$JSDK_LIB/jsdk.jar:$JSWDK
/lib/servlet.jar:$JSWDK/lib/jspengine.jar:$JSWDK_LIB/xml.jar
CLASSPATH=$classpath

export classpath
export CLASSPATH

PATH /usr/local/jdk/bin:$PATH

export PATH

# . ~/.profile

注意:最好不要用系统安装的kafee,移除/usr/bin/java* /usr/bin/jar

附加应用:
(在刚才展开的几个源码目录下面运行./cfg,或者./configure,然后编译安装)

01. openldap-1.2.8
02. imap-4.5
03. zlib-1.1.3
04. libwmf-0.1.17
05. freetype-1.3.1
06. pdflib-3.0

SSL相关应用:
(在刚才展开的几个源码目录下面运行./cfg,或者./configure,然后编译安装)

07. mm-1.0.9
08. rsaref20
09. openssl-0.9.4

Apache+JServ+JSSI+PHP4:
(所有动作均在各自源码目录下面)

10. 先在apache_1.3.12的源码目录下面以./configure --prefix=/usr/local/a
pache 配置一下
11. 然后配置ApacheJServ-1.1.2 Make;Make Install;

12. php-4.0.1pl2
    ./cfg;make;make install

13. mod_ssl-2.6.0-1.3.12.tar.gz
    ./cfg;

14. apache_1.3.12
    make;make install;

15. 按照ApacheJSSI的说明修改/usr/local/apache/jserv/etc/jserv.conf,以及
拷贝ApacheJSSI.jar
    到/usr/local/apache/jerv/libexec下面

16. 按照ojsp的说明(在/usr/local/ojsp/index.htm)修改 
    /usr/local/apache/jserv/etc/jserv.conf
    和
    /usr/local/apache/jserv/etc/jserv.properties

17. 在 /usr/local/apache/conf/httpf.conf 中添加
    Include /usr/local/apache/jserv/etc/jserv.conf

以下为我的jserv.conf 以及 jserv.properties,zone.properties
# cat jserv.conf
######################################################################
#########
#                     Apache JServ Configuration File                 
        #
######################################################################
#########

# Note: this file should be appended or included into your httpd.conf


# Tell Apache on win32 to load the Apache JServ communication module
#LoadModule jserv_module modules/ApacheModuleJServ.dll

# Tell Apache on Unix to load the Apache JServ communication module
# For shared object builds only!!!
#LoadModule jserv_module /usr/local/apache/jserv/libexec/mod_jserv.so


<IfModule mod_jserv.c>

# Whether Apache must start Apache JServ or not (On=Manual Off=Autosta
rt)
# Syntax: ApJServManual [on/off]
# Default: "Off"
ApJServManual off

# Properties filename for Apache JServ in Automatic Mode.
# In manual mode this directive is ignored
# Syntax: ApJServProperties [filename]
# Default: "./conf/jserv.properties"
ApJServProperties /usr/local/apache/jserv/etc/jserv.properties

# Log file for this module operation relative to Apache root directory
.
# Set the name of the trace/log file.  To avoid possible confusion abo
ut
# the location of this file, an absolute pathname is recommended.
#
# This log file is different than the log file that is in the
# jserv.properties file. This is the log file for the C portion of Apa
che
# JServ.
#
# On Unix, this file must have write permissions by the owner of the J
VM
# process. In other words, if you are running Apache JServ in manual m
ode
# and Apache is running as user nobody, then the file must have its
# permissions set so that that user can write to it.
# Syntax: ApJServLogFile [filename]
# Default: "./logs/mod_jserv.log"
# Note: when set to "DISABLED", the log will be redirected to Apache e
rror log
ApJServLogFile /usr/local/apache/logs/mod_jserv.log

# Log Level for this module
# Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|eme
rg]
# Default: info    (unless compiled w/ JSERV_DEBUG, in which case it's
 debug)
ApJServLogLevel notice

# Protocol used by this host to connect to Apache JServ
# (see documentation for more details on available protocols)
# Syntax: ApJServDefaultProtocol [name]
# Default: "ajpv12"
ApJServDefaultProtocol ajpv12

# Default host on which Apache JServ is running
# Syntax: ApJServDefaultHost [hostname]
# Default: "localhost"
#ApJServDefaultHost java.apache.org
#ApJServDefaultHost www.snc.siemens.com.cn

# Default port that Apache JServ is listening to
# Syntax: ApJServDefaultPort [number]
# Default: protocol-dependant (for ajpv12 protocol this is "8007")
ApJServDefaultPort 8007

# The amount of time to give to the JVM to start up as well
# as the amount of time to wait to ping the JVM to see if it
# is alive. Slow or heavily loaded machines might want to
# increase this value.
# Default: 10 seconds
# ApJServVMTimeout 10

# Passes parameter and value to specified protocol.
# Syntax: ApJServProtocolParameter [name] [parameter] [value]
# Default: NONE
# Note: Currently no protocols handle this. Introduced for future prot
ocols.

# Apache JServ secret key file relative to Apache root directory.
# Syntax: ApJServSecretKey [filename]
# Default: "./conf/jserv.secret.key"
# Warning: if authentication is DISABLED, everyone on this machine (no
t just
# this module) may connect to your servlet engine and execute servlet

# bypassing web server restrictions. See the documentation for more in
formation
#ApJServSecretKey /usr/local/apache/jserv/etc/jserv.secret.key
ApJServSecretKey DISABLED

# Mount point for Servlet zones
# (see documentation for more information on servlet zones)
# Syntax: ApJServMount [name] [jserv-url]
# Default: NONE
# Note: [name] is the name of the Apache URI path to mount jserv-url o
n
#       [jserv-url] is something like "protocol://host:port/zone"
#  If protocol, host or port are not specified, the values from
#  "ApJServDefaultProtocol", "ApJServDefaultHost" or "ApJServDefaultPo
rt"
#  will be used.
#  If zone is not specified, the zone name will be the first subdirect
ory of
#  the called servlet.
# Example: "ApJServMount /servlets /myServlets"
#  if user requests "http://host/servlets/TestServlet"
#  the servlet "TestServlet" in zone "myServlets" on default host
#  thru default protocol on defaul port will be requested
# Example: "ApJServMount /servlets ajpv12://localhost:8007"
#  if user requests "http://host/servlets/myServlets/TestServlet"
#  the servlet "TestServlet" in zone "myServlets" will be requested
# Example: "ApJServMount /servlets ajpv12://jserv.mydomain.com:15643/m
yServlets"
#  if user requests "http://host/servlets/TestServlet" the servlet
#  "TestServlet" in zone "myServlets" on host "jserv.mydomain.com" usi
ng
#  "ajpv12" protocol on port "15643" will be executed
ApJServMount /servlets /root
ApJServMount /servlet /root

# Whether <VirtualHost> inherits base host mount points or not
# Syntax: ApJServMountCopy [on/off]
# Default: "On"
# Note: This directive is meaninful only when virtual hosts are being 
used
ApJServMountCopy on

# Executes a servlet passing filename with proper extension in PATH_TR
ANSLATED
# property of servlet request.
# Syntax: ApJServAction [extension] [servlet-uri]
# Defaults: NONE
# Notes: This is used for external tools.
#ApJServAction .jsp /servlets/org.gjt.jsp.JSPServlet
#ApJServAction .gsp /servlets/com.bitmechanic.gsp.GspServlet
#ApJServAction .jhtml /servlets/org.apache.servlet.ssi.SSI
#ApJServAction .xml /servlets/org.apache.cocoon.Cocoon
#ApJServAction .jsp /alph/gnujsp
ApJServAction .jsp /servlets/oracle.jsp.JspServlet
ApJServAction .jhtml /servlets/org.apache.servlet.ssi.SSI

# Enable the Apache JServ status handler with the URL of
# "http://servername/jserv/" (note the trailing slash!)
# Change the "deny" directive to restrict access to this status page.

<Location /jserv/>
  SetHandler jserv-status

  order deny,allow
  deny from all
  allow from 127.0.0.1
</Location>

############################## W A R N I N G #########################
#########
# Remember to disable or otherwise protect the execution of the Apache
 JServ  #
# Status Handler (see right above) on a production environment since t
his may #
# give untrusted users the ability to obtain restricted information on
 your   #
# servlets and their initialization arguments such as JDBC passwords a
nd      #
# other important information. The Apache JServ Status Handler should 
be      #
# accessible only by system administrators.                           
        #
######################################################################
#########

</IfModule>

# cat jserv.properties
######################################################################
#########
#                        Apache JServ Configuration File              
        #
######################################################################
#########

################################ W A R N I N G #######################
#########
# Unlike normal Java properties, JServ configurations have some import
ant
# extentions:
#
#    1) commas are used as token separators
#    2) multiple definitions of the same key are concatenated in a
#       comma-separated list.
######################################################################
#########

#
# Execution parameters
#######################

# The Java Virtual Machine interpreter.
# Syntax: wrapper.bin=[filename] (String)
# Note: specify a full path if the interpreter is not visible in your 
path.
wrapper.bin=/usr/local/jdk/bin/java

# Arguments passed to Java interpreter (optional)
# Syntax: wrapper.bin.parameters=[parameters] (String)
# Default: NONE

# Apache JServ entry point class (should not be changed)
# Syntax: wrapper.class=[classname] (String)
# Default: "org.apache.jserv.JServ"

# Arguments passed to main class after the properties filename (not us
ed)
# Syntax: wrapper.class.parameters=[parameters] (String)
# Default: NONE
# Note: currently not used

# PATH environment value passed to the JVM
# Syntax: wrapper.path=[path] (String)
# Default: "/bin:/usr/bin:/usr/local/bin" for Unix systems
#          "c:\(windows-dir);c:\(windows-system-dir)" for Win32 system
s
# Notes: if more than one line is supplied these will be concatenated 
using
#        ":" or ";" (depending wether Unix or Win32) characters
#        Under Win32 (windows-dir) and (windows-system-dir) will be
#        automatically evaluated to match your system requirements
wrapper.path=/usr/bin:/usr/local/bin:/usr/local/jdk/bin:/usr/local/jsd
k/bin:/usr/local/jswdk/bin:/usr/local/jre/bin


# CLASSPATH environment value passed to the JVM
# Syntax: wrapper.classpath=[path] (String)
# Default: NONE (Sun's JDK/JRE already have a default classpath)
# Note: if more than one line is supplied these will be concatenated u
sing
#       ":" or ";" (depending wether Unix or Win32) characters. JVM mu
st be
#       able to find JSDK and JServ classes and any utility classes us
ed by
#       your servlets.
# Note: the classes you want to be automatically reloaded upon modific
ation
#       MUST NOT be in this classpath or the classpath of the shell
#       you start the Apache from.
#
wrapper.classpath=/usr/local/apache/jserv/libexec/ApacheJServ.jar
wrapper.classpath=/usr/local/jsdk/lib/jsdk.jar

wrapper.classpath=/usr/local/jre/lib/rt.jar
wrapper.classpath=/usr/local/jdk/lib/tools.jar
wrapper.classpath=/usr/local/ojsp/lib/ojsp.jar
wrapper.classpath=/usr/local/jswdk/lib/servlet.jar
wrapper.classpath=/usr/local/ojsp/lib/xmlparsev2.jar
wrapper.classpath=/usr/local/ojsp/lib/translator.zip

# An environment name with value passed to the JVM
# Syntax: wrapper.env=[name]=[value] (String)
# Default: NONE on Unix Systems
#          SystemDrive and SystemRoot with appropriate values on Win32
 systems

# An environment name with value copied from caller to Java Virtual Ma
chine
# Syntax: wrapper.env.copy=[name] (String)
# Default: NONE

# Copies all environment from caller to Java Virtual Machine
# Syntax: wrapper.env.copyall=[true|false] (boolean)
# Default: false

# Protocol used for signal handling
# Syntax: wrapper.protocol=[name] (String)
# Default: ajpv12

#
# General parameters
######################

# Set the default IP address or hostname Apache JServ binds (or listen
s) to.
#
# If you have a machine with multiple IP addresses, this address
# will be the one used. If you set the value to localhost, it
# will be resolved to the IP address configured for the locahost
# on your system (generally this is 127.0.0.1). This feature is so
# that one can have multiple instances of Apache JServ listening on
# the same port number, but different IP addresses on the same machine
.
# Use bindaddress=* only if you know exactly what you are doing here,

# as it could let JServ wide open to the internet.
# You must understand that JServ has to answer only to Apache, and sho
uld not
# be reachable by nobody but mod_jserv. So localhost is usually a
# good option. The second best choice would be an internal network add
ress
# (protected by a firewall) if JServ is running on another machine tha
n Apache.
# Ask your network admin.
# "*" _may_ be used on boxes where some of the clients get connected u
sing
# "localhost"and others using another IP addr.
#
# Syntax: bindaddress=[ipaddress] or [localhost] or [*]
# Default: localhost
# bindaddress=i140.231.59.250

# Set the port Apache JServ listens to.
# Syntax: port=[1024,65535] (int)
# Default: 8007
port=8007

#
# Servlet Zones parameters
###########################

# List of servlet zones Apache JServ manages
# Syntax: zones=[servlet zone],[servlet zone]... (Comma separated list
 of String)
# Default: NONE
zones=root

# Configuration file for each servlet zone (one per servlet zone)
# Syntax: [servlet zone name as on the zones list].properties=[full pa
th to configFile] (String)
# Default: NONE
# Note: if the file could not be opened, try using absolute paths.
root.properties=/usr/local/apache/jserv/etc/zone.properties

#
# Thread Pool parameters
#########################

# Enables or disables the use of the thread pool.
# Syntax: pool=[true|false] (boolean)
# Default: false
# WARNING: the pool has not been extensively tested and may generate d
eadlocks.
# For this reason, we advise against using this code in production env
ironments.
pool=false

# Indicates the number of idle threads that the pool may contain.
# Syntax: pool.capacity=(int)>0
# Default: 10
# NOTE: depending on your system load, this number should be low for c
ontantly
# loaded servers and should be increased depending on load bursts.
pool.capacity=10

# Indicates the pool controller that should be used to control the
# level of the recycled threads.
# Syntax: pool.controller=[full class of controller] (String)
# Default: org.apache.java.recycle.DefaultController
# NOTE: it is safe to leave this unchanged unless special recycle beha
vior
# is needed. Look at the "org.apache.java.recycle" package javadocs fo
r more
# info on other pool controllers and their behavior.
pool.controller=org.apache.java.recycle.DefaultController

#
# Security parameters
#####################

# Enable/disable the execution of org.apache.jserv.JServ as a servlet.

# Syntax: security.selfservlet=[true|false] (boolean)
# Default: false
security.selfservlet=true

# Set the maximum number of socket connections Apache JServ may handle

# simultaneously. Make sure your operating environment has enough file

# descriptors to allow this number.
# Syntax: security.maxConnections=(int)>1
# Default: 50
security.maxConnections=50

# Backlog setting for very fine performance tunning of JServ.
# Unless you are familiar to sockets leave this value commented out.
# security.backlog=5

# List of IP addresses allowed to connect to Apache JServ. This is a f
irst
# security filtering to reject possibly unsecure connections and avoid
 the
# overhead of connection authentication.
# <warning>
# (please don't use the following one unless you know what you are doi
ng :
#    security.allowedAddresses=DISABLED
#   allows connections on JServ'port from entire internet.)
#   You do need only to allow YOUR  Apache to talk to JServ.
# </warning>
#
# Default: 127.0.0.1
# Syntax: security.allowedAddresses=[IP address],[IP Address]... (Comm
a separated list of IP addresses)
#security.allowedAddresses=127.0.0.1

# Enable/disable connection authentication.
# NOTE: unauthenticated connections are a little faster since authenti
cation
# handshake is not performed at connection creation.
# Syntax: security.authentication=[true,false] (boolean)
# Default: true
security.authentication=false

# Authentication secret key.
# The secret key is passed as a file that must be kept secure and must

# be exactly the same of those used by clients to authenticate themsel
ves.
# Syntax: security.secretKey=[secret key path and filename] (String)
# Default: NONE
# Note: if the file could not be opened, try using absolute paths.
#security.secretKey=/usr/local/apache/jserv/etc/jserv.secret.key

# Length of the randomly generated challenge string (in bytes) used to

# authenticate connections. 5 is the lowest possible choice to force a
 safe
# level of security and reduce connection creation overhead.
# Syntax: security.challengeSize=(int)>5
# Default: 5
#security.challengeSize=5

#
# Logging parameters
####################

# Enable/disable Apache JServ logging.
# Syntax: log=[true,false] (boolean)
# Default: true
log=true

# Set the name of the trace/log file.  To avoid possible confusion abo
ut
# the location of this file, an absolute pathname is recommended.
#
# On Unix, this file must have write permissions by the owner of the J
VM
# process. In other words, if you are running Apache JServ in manual m
ode
# and Apache is running as user nobody, then the file must have its
# permissions set so that that user can write to it.
# Syntax: log.file=[log path and filename] (String)
# Default: NONE
# Note: if the file could not be opened, try using absolute paths.
log.file=/usr/local/apache/log/jserv.log

# Enable the timestamp before the log message
# Syntax: log.timestamp=[true,false] (boolean)
# Default: true
log.timestamp=true

# Use the given string as a data format
# (see java.text.SimpleDateFormat for the list of options)
# Syntax: log.dateFormat=(String)
# Default: [dd/MM/yyyy HH:mm:ss:SSS zz]
log.dateFormat=[dd/MM/yyyy HH:mm:ss:SSS zz]


# WARNING: Default values are lousy, you probably want to tweak them a
nd
# report the results back to the development team.

# Syntax: log.queue.maxage = [milliseconds]
# Default: 5000
log.queue.maxage = 5000

# Syntax: log.queue.maxsize = [integer]
# Default: 1000
log.queue.maxsize = 1000
# Enable the timestamp before the log message
# Syntax: log.timestamp=[true,false] (boolean)
# Default: true
log.timestamp=true

# Use the given string as a data format
# (see java.text.SimpleDateFormat for the list of options)
# Syntax: log.dateFormat=(String)
# Default: [dd/MM/yyyy HH:mm:ss:SSS zz]
log.dateFormat=[dd/MM/yyyy HH:mm:ss:SSS zz]


# Syntax: log.queue.maxage = [milliseconds]
# Default: 5000
log.queue.maxage = 5000

# Syntax: log.queue.maxsize = [integer]
# Default: 1000
log.queue.maxsize = 1000


# Enable/disable logging the channel name
# Default: false
# log.channel=false

# Enable/disable channels, each logging different actions.
# Syntax: log.channel.[channel name]=[true,false] (boolean)
# Default: false

# Info channel - quite a lot of informational messages
# hopefully you don't need them under normal circumstances
# log.channel.info=true

# Servlets exception, i.e. exception caught during
# servlet.service() processing are monitored here
# you probably want to have this one switched on
log.channel.servletException=true

# JServ exception, caught internally in jserv
# we suggest to leave it on
log.channel.jservException=true

# Warning channel, it catches all the important
# messages that don't cause JServ to stop, leave it on
log.channel.warning=true

# Servlet log
# All messages logged by servlets. Probably you want
# this one to be switched on.
log.channel.servletLog=true

# Critical errors
# Messages produced by critical events causing jserv to stop
log.channel.critical=true

# Debug channel
# Only for internal debugging purposes
# log.channel.debug=true

# cat zone.properties
######################################################################
#########
#                        Servlet Zone Configuration File              
        #
######################################################################
#########


# List of Repositories
#######################

# The list of servlet repositories controlled by this servlet zone
# Syntax: repositories=[repository],[repository]...
# Default: NONE
# Note: The classes you want to be reloaded upon modification should b
e put
#       here.

repositories=/usr/local/apache/jserv/servlets

repositories=/usr/local/apache/jserv/libexec/ApacheJServ.jar
repositories=/usr/local/apache/jserv/libexec/ApacheJSSI.jar

# Classloader parameters
#########################

# Enable servlet class autoreloading.
# Syntax: autoreload.classes=[true,false] (boolean)
# Default: true
autoreload.classes=true

# Enable servlet resourced autoreloading (properties and other loaded 
resources)
# Syntax: autoreload.file=[true,false] (boolean)
# Default: true
autoreload.file=true

# Set the number of millisecond to wait before giving up on initializi
ng a servlet.
# (a timeout of zero means no timeout)
# Syntax: init.timeout=(long)>0
# Default: 10000 (10 secs)
init.timeout=10000

# Set the number of millisecond to wait before giving up on destroying
 a servlet.
# (a timeout of zero means no timeout)
# Syntax: destroy.timeout=(long)>0
# Default: 10000 (10 secs)
destroy.timeout=10000

# Session Cookie Parameters
############################

# Syntax: session.useCookies=[true,false] (boolean)
# Default: true
session.useCookies=true


# Set the number of millisecond to wait before invalidating an unused 
session.
# Syntax: session.timeout=(long)>0
# Default: 1800000 (30 mins)
session.timeout=1800000

# Set how frequently (milliseconds) to check for timed-out sessions.
# Syntax: session.checkFrequency=(long)>0
# Default: 30000 (30 secs)
session.checkFrequency=30000

# Set the domain= header that gets sent with the cookie. This is
# entirely optional
# Default: null
#session.topleveldomain=.foo.com

# SingleThreadModel Servlets parameters
########################################

# Set the initial capacity of the STM servlets pool.
# Syntax: singleThreadModelServlet.initialCapacity=(int)>1
# Default: 5
singleThreadModelServlet.initialCapacity=5

# Set the number of servlet instances should be added to the pool if f
ound empty.
# Syntax: singleThreadModelServlet.incrementCapacity=(int)>1
# Default: 5
singleThreadModelServlet.incrementCapacity=5

# Set the maximum capacity of the STM pool
# Syntax: singleThreadModelServlet.maximumCapacity=(int)>1
# Default: 10
singleThreadModelServlet.maximumCapacity=10

################### S E R V L E T    P A R A M E T E R S #############
#########

# Oracle jsr Servlet initArgs
#################################
servlet.oracle.jsp.JspServlet.initArgs=developer_mode=false
servlet.oracle.jsp.JspServlet.initArgs=translate_params=true
servlet.oracle.jsp.JspServlet.initArgs=page_repository_root=/var/apach
e/jsp
servlet.oracle.jsp.JspServlet.initArgs=classpath=/usr/local/jdk/lib/dt
.jar:/usr/local/jdk/lib/tools.jar:/usr/local/jsdk/lib/jsdk.jar:/usr/lo
cal/jswdk/lib/servlet.jar
servlet.oracle.jsp.JspServlet.initArgs=scratchdir=/var/apache/jsp
servlet.oracle.jsp.JspServlet.initArgs=compiler=builtin-javac -classpa
th %classpath%:%scratchdir%:/usr
servlet.oracle.jsp.JspServlet.initArgs=jserv=true

scratchdir 的模式我是 777.没有试验其他的值

至此应该全部安装完毕,/usr/local/apache/bin/apachectl startssl 应该可以
正常运行
接着可以测试servlet和jsp应用

另外:注意在url里面最好不要有"~"符号,否则可能有java编译问题

如果有什么问题可以互相探讨。
--
    读万卷书  行万里路  乘万里风 破万里浪
-============================================-
          博览群书:)
个人主页:http://done.163.net
镜像站点:http://member.netease.com/~top

※ 修改:.netcharm 于 Jul 13 14:21:16 修改本文.[FROM: 202.102.66.10]
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.102.66.10]

[关闭][返回]