--- a/components/tomcat/Solaris/tomcat.1m Sat Apr 21 06:47:00 2012 -0700
+++ b/components/tomcat/Solaris/tomcat.1m Mon Apr 23 02:00:40 2012 -0700
@@ -1,6 +1,6 @@
'\" te
-.\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
-.TH tomcat 1M "June 2011" "SunOS 5.11" "System Administration Commands"
+.\" Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+.TH tomcat 1M "April 2012" "SunOS 5.11" "System Administration Commands"
.SH NAME
tomcat \- Apache Tomcat Version 6 overview
.SH DESCRIPTION
@@ -87,6 +87,8 @@
.RS 4n
Contains Tomcat configuration files. A newly-installed Tomcat
contains a default \fBserver.xml\fR file. This is the main configuration file.
+For setting Tomcat environment variables it's possible to create here
+\fBsetenv.sh\fR file which is sourced during start by catalina.sh.
.RE
.sp
--- a/components/tomcat/patches/env.patch Sat Apr 21 06:47:00 2012 -0700
+++ b/components/tomcat/patches/env.patch Mon Apr 23 02:00:40 2012 -0700
@@ -1,6 +1,6 @@
---- apache-tomcat-6.0.18-src/bin/catalina.sh.orig Fri Dec 5 06:54:48 2008
-+++ apache-tomcat-6.0.18-src/bin/catalina.sh Fri Dec 5 07:06:15 2008
-@@ -78,6 +78,7 @@
+--- apache-tomcat-6.0.35-src/bin/catalina.sh Mon Nov 28 02:22:44 2011
++++ apache-tomcat-6.0.35-src/bin/catalina.sh Mon Apr 16 08:42:47 2012
+@@ -92,6 +92,7 @@
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
Darwin*) darwin=true;;
@@ -8,7 +8,29 @@
esac
# resolve links - $0 may be a softlink
-@@ -127,6 +128,11 @@
+@@ -120,8 +121,19 @@
+ # but allow them to be specified in setenv.sh, in rare case when it is needed.
+ CLASSPATH=
+
+-if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
+- . "$CATALINA_BASE/bin/setenv.sh"
++# On Solaris we want to allow running system Tomcat instance (where
++# setenv.sh file is located in /var/tomcat6/conf) in parallel to Tomcat
++# instances started by individual users. As it's expected that all will
++# use the same copy of catalina.sh some extra logic needs to be added
++# here:
++if [ "$CATALINA_BASE" = "/var/tomcat6" ]; then
++ SETENVDIR="conf"
++else
++ SETENVDIR="bin"
++fi
++
++if [ -r "$CATALINA_BASE/$SETENVDIR/setenv.sh" ]; then
++ . "$CATALINA_BASE/$SETENVDIR/setenv.sh"
+ elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+ . "$CATALINA_HOME/bin/setenv.sh"
+ fi
+@@ -147,6 +159,11 @@
export QIBM_MULTI_THREADED=Y
fi
@@ -20,8 +42,8 @@
# Get standard Java environment variables
if $os400; then
# -r will Only work on the os400 if the files are:
---- apache-tomcat-6.0.18-src/bin/tool-wrapper.sh.orig Fri Dec 5 07:01:29 2008
-+++ apache-tomcat-6.0.18-src/bin/tool-wrapper.sh Fri Dec 5 07:05:52 2008
+--- apache-tomcat-6.0.35-src/bin/tool-wrapper.sh Mon Nov 28 02:22:44 2011
++++ apache-tomcat-6.0.35-src/bin/tool-wrapper.sh Mon Apr 16 08:42:57 2012
@@ -35,8 +35,10 @@
# OS specific support. $var _must_ be set to either true or false.
@@ -33,7 +55,33 @@
esac
# resolve links - $0 may be a softlink
-@@ -66,6 +68,11 @@
+@@ -60,10 +62,23 @@
+ # but allow them to be specified in setenv.sh, in rare case when it is needed.
+ CLASSPATH=
+
+-if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+- . "$CATALINA_HOME"/bin/setenv.sh
++# On Solaris we want to allow running system Tomcat instance (where
++# setenv.sh file is located in /var/tomcat6/conf) in parallel to Tomcat
++# instances started by individual users. As it's expected that all will
++# use the same copy of catalina.sh some extra logic needs to be added
++# here:
++if [ "$CATALINA_BASE" = "/var/tomcat6" ]; then
++ SETENVDIR="conf"
++else
++ SETENVDIR="bin"
+ fi
+
++if [ -r "$CATALINA_BASE/$SETENVDIR/setenv.sh" ]; then
++ . "$CATALINA_BASE/$SETENVDIR/setenv.sh"
++elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
++ . "$CATALINA_HOME/bin/setenv.sh"
++fi
++
+ # For Cygwin, ensure paths are in UNIX format before anything is touched
+ if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+@@ -71,6 +86,11 @@
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi