* tomcat 5.0.x [#c7f5cba9]
GETパラメータのURL-Encodeされたパラメータをdecodeする。~
useBodyEncodingForURI="true"~
** 設定ファイル [#x9c87b5b]
*** tomcat5 [#u044c645]
*** server.xml [#h29a3150]
Tomcat5ではsetCharacterEncoding()はボディ部に適用されるだけで、
URI(GETパラメータ)の復号に使用されなくなった。~
URL(GETパラメータ)の複合を行うためには、Connecter定義のuseBodyEncodingForURIにtrueを設定する必要がある。~
~
*** tomcat50(起動スクリプト) [#xedc4c6d]
#!/bin/bash
#
# chkconfig: 345 97 03
# description: tomcat5
# description: tomcat50
#
# Startup script for Tomcat Application Server
#
# ----- Save and Set Environment Variables --------------------------------
PROGDIR=/usr/local/jakarta-tomcat5/bin
PROGUSER=tomcat5
PROGDIR=/usr/local/jakarta-tomcat-5.0/bin
PROGUSER=tomcat50
UMASK_VALUE=002
LOCALE=ja_JP.eucJP
JAVA_HOME=/usr/local/j2sdk
#CATALINA_OPTS="-server -Xmx1024m -Xms1024m -Xss256k -XX:NewSize=256m -XX:MaxNewSize=256m"
JAVA_HOME=/usr/local/jdk-1.4.2
CATALINA_OPTS="-server -Xmx256m -Xms128m -Xss256k -XX:NewSize=64m -XX:MaxNewSize=64m -Djava.awt.headless=true"
# ----- Define Function ---------------------------------------------------
start() {
su - ${PROGUSER} -c "umask ${UMASK_VALUE}; LC_ALL=${LOCALE} JAVA_HOME=${JAVA_HOME} ${PROGDIR}/catalina.sh start"
su - ${PROGUSER} -c "umask ${UMASK_VALUE}; env LC_ALL=${LOCALE} JAVA_HOME=${JAVA_HOME} CATALINA_OPTS=\"${CATALINA_OPTS}\" ${PROGDIR}/catalina.sh start"
}
stop() {
su - ${PROGUSER} -c "umask ${UMASK_VALUE}; LC_ALL=${LOCALE} JAVA_HOME=${JAVA_HOME} ${PROGDIR}/catalina.sh stop"
su - ${PROGUSER} -c "umask ${UMASK_VALUE}; env LC_ALL=${LOCALE} JAVA_HOME=${JAVA_HOME} CATALINA_OPTS=\"${CATALINA_OPTS}\" ${PROGDIR}/catalina.sh stop"
}
wait() {
while :
do
ps -ef | cut -d " " -f 1 | grep ${PROGUSER}
if [ $? -ne 0 ]; then
break;
fi
sleep 1
done 2>&1 > /dev/null
}
# ----- Execute The Requested Command -------------------------------------
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 1
wait
start
;;
*)
echo "Usage:"
echo " $0 (start|stop|reload)"
echo ""
echo "Commands:"
echo " start - Start server"
echo " stop - Stop server"
echo " restart - Restart server"
echo ""
;;
esac
exit 0
** workers2.properties [#wd9ceba3]
[status:]
[uri:/jkstatus/*]
group=status:
[shm:]
disabled=1
[channel.socket:localhost:8009]
group=tomcat4
[channel.socket:localhost:18009]
group=tomcat5
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[ajp13:localhost:18009]
channel=channel.socket:localhost:18009
# tomcat4 webapps
[uri:/tomcat4webapp/*]
group=tomcat4
[uri:other.host/otherhostwebapp]
group=tomcat4
# tomcat5 webapps
[uri:/tomcat5webapp/*]
group=tomcat5