Tomcat is the Java Servlet / Java Server Page environment produced
by the Apache Foundation's Jakarta Project. This package provides the Apache Tomcat connector.
This commit is contained in:
parent
609ee9fad9
commit
cfaba9a100
42
www/jserv/Makefile
Normal file
42
www/jserv/Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2001/06/17 12:22:17 reinhard Exp $
|
||||
|
||||
# Build just the Tomcat connector for our in-tree Apache
|
||||
COMMENT= "Tomcat (Servlet/JSP) - Apache Connector"
|
||||
|
||||
VER= 3.2.1
|
||||
PKGNAME= jserv-${VER}
|
||||
DISTNAME= jakarta-tomcat-${VER}-src
|
||||
CATEGORIES= www
|
||||
NEED_VERSION= 1.414
|
||||
MASTER_SITES= http://jakarta.apache.org/builds/tomcat/release/v3.2.1/src/
|
||||
|
||||
HOMEPAGE= http://jakarta.apache.org/
|
||||
|
||||
MAINTAINER= Reinhard J. Sammer <reinhard@openbsd.org>
|
||||
|
||||
# XXX: USE_JAVA=TBD
|
||||
JAVA_HOME= ${LOCALBASE}/jdk1.2-blackdown
|
||||
BUILD_DEPENDS= ${JAVA_HOME}/bin/java::devel/jdk/1.2-blackdown
|
||||
RUN_DEPENDS= ${LOCALBASE}/tomcat/bin/tomcat.sh::www/jakarta-tomcat
|
||||
|
||||
# Apache Software License
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/src/native/apache/jserv && /usr/sbin/apxs -c *.c -o mod_jserv.so
|
||||
|
||||
post-build:
|
||||
strip ${WRKSRC}/src/native/apache/jserv/mod_jserv.so
|
||||
|
||||
do-install:
|
||||
sed 's,y0y0y0,${TRUEPREFIX},' \
|
||||
<${FILESDIR}/jserv-enable >${WRKSRC}/jserv-enable
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/jserv-enable ${PREFIX}/sbin/jserv-enable
|
||||
${INSTALL_DATA} ${WRKSRC}/src/native/apache/jserv/mod_jserv.so ${PREFIX}/lib
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/jserv
|
||||
${INSTALL_DATA} ${FILESDIR}/server.xml ${PREFIX}/share/examples/jserv
|
||||
|
||||
.include "bsd.port.mk"
|
27
www/jserv/files/jserv-enable
Normal file
27
www/jserv/files/jserv-enable
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: jserv-enable,v 1.1.1.1 2001/06/17 12:22:17 reinhard Exp $
|
||||
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
HTTPD_CONF=`apxs -q SYSCONFDIR`/httpd.conf
|
||||
#HTTPD_CONF=/var/www/conf/httpd.conf
|
||||
MODULE=y0y0y0/lib/mod_jserv.so
|
||||
XML=y0y0y0/share/examples/jserv/server.xml
|
||||
|
||||
if [ ! -f ${MODULE} ]; then
|
||||
echo "can't find jserv module (${MODULE})"
|
||||
exit 1
|
||||
else
|
||||
echo "enabling jserv (Apache-Tomcat connector)..."
|
||||
apxs -i -a -n jserv ${MODULE}
|
||||
echo "" >> $HTTPD_CONF
|
||||
echo "# jserv (Apache-Tomcat connector)" >> $HTTPD_CONF
|
||||
echo "include /etc/tomcat/tomcat-apache.conf" >> $HTTPD_CONF
|
||||
echo ""
|
||||
echo "You may want to disable the 'HttpConnectionHandler' on port 8080"
|
||||
echo "in /etc/tomcat/server.xml if jakarta-tomcat should only serve"
|
||||
echo "requests for Apache."
|
||||
echo "See ${XML} for an example."
|
||||
fi
|
3
www/jserv/files/md5
Normal file
3
www/jserv/files/md5
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (jakarta-tomcat-3.2.1-src.tar.gz) = ca0307722836c778392a17b2c6c9a598
|
||||
RMD160 (jakarta-tomcat-3.2.1-src.tar.gz) = b0d22dbe471b215fe8e6f4611a664fbbe2eca23f
|
||||
SHA1 (jakarta-tomcat-3.2.1-src.tar.gz) = c28d97378dcc1c9a15d15cae404733674ae91c9c
|
321
www/jserv/files/server.xml
Normal file
321
www/jserv/files/server.xml
Normal file
@ -0,0 +1,321 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<Server>
|
||||
<!-- Debug low-level events in XmlMapper startup -->
|
||||
<xmlmapper:debug level="0" />
|
||||
|
||||
<!--
|
||||
|
||||
Logging:
|
||||
|
||||
Logging in Tomcat is quite flexible; we can either have a log
|
||||
file per module (example: ContextManager) or we can have one
|
||||
for Servlets and one for Jasper, or we can just have one
|
||||
tomcat.log for both Servlet and Jasper. Right now there are
|
||||
three standard log streams, "tc_log", "servlet_log", and
|
||||
"JASPER_LOG".
|
||||
|
||||
Path:
|
||||
|
||||
The file to which to output this log, relative to
|
||||
TOMCAT_HOME. If you omit a "path" value, then stderr or
|
||||
stdout will be used.
|
||||
|
||||
Verbosity:
|
||||
|
||||
Threshold for which types of messages are displayed in the
|
||||
log. Levels are inclusive; that is, "WARNING" level displays
|
||||
any log message marked as warning, error, or fatal. Default
|
||||
level is WARNING.
|
||||
|
||||
verbosityLevel values can be:
|
||||
FATAL
|
||||
ERROR
|
||||
WARNING
|
||||
INFORMATION
|
||||
DEBUG
|
||||
|
||||
Timestamps:
|
||||
|
||||
By default, logs print a timestamp in the form "yyyy-MM-dd
|
||||
hh:mm:ss" in front of each message. To disable timestamps
|
||||
completely, set 'timestamp="no"'. To use the raw
|
||||
msec-since-epoch, which is more efficient, set
|
||||
'timestampFormat="msec"'. If you want a custom format, you
|
||||
can use 'timestampFormat="hh:mm:ss"' following the syntax of
|
||||
java.text.SimpleDateFormat (see Javadoc API). For a
|
||||
production environment, we recommend turning timestamps off,
|
||||
or setting the format to "msec".
|
||||
|
||||
Custom Output:
|
||||
|
||||
"Custom" means "normal looking". "Non-custom" means
|
||||
"surrounded with funny xml tags". In preparation for
|
||||
possibly disposing of "custom" altogether, now the default is
|
||||
'custom="yes"' (i.e. no tags)
|
||||
|
||||
Per-component Debugging:
|
||||
|
||||
Some components accept a "debug" attribute. This further
|
||||
enhances log output. If you set the "debug" level for a
|
||||
component, it may output extra debugging information.
|
||||
-->
|
||||
|
||||
<!-- if you don't want messages on screen, add the attribute
|
||||
path="logs/tomcat.log"
|
||||
to the Logger element below
|
||||
-->
|
||||
<Logger name="tc_log"
|
||||
verbosityLevel = "INFORMATION"
|
||||
/>
|
||||
|
||||
<Logger name="servlet_log"
|
||||
path="logs/servlet.log"
|
||||
/>
|
||||
|
||||
<Logger name="JASPER_LOG"
|
||||
path="logs/jasper.log"
|
||||
verbosityLevel = "INFORMATION" />
|
||||
|
||||
<!-- You can add a "home" attribute to represent the "base" for
|
||||
all relative paths. If none is set, the TOMCAT_HOME property
|
||||
will be used, and if not set "." will be used.
|
||||
webapps/, work/ and logs/ will be relative to this ( unless
|
||||
set explicitely to absolute paths ).
|
||||
|
||||
You can also specify a "randomClass" attribute, which determines
|
||||
a subclass of java.util.Random will be used for generating session IDs.
|
||||
By default this is "java.security.SecureRandom".
|
||||
Specifying "java.util.Random" will speed up Tomcat startup,
|
||||
but it will cause sessions to be less secure.
|
||||
|
||||
You can specify the "showDebugInfo" attribute to control whether
|
||||
debugging information is displayed in Tomcat's default responses.
|
||||
This debugging information includes:
|
||||
1. Stack traces for exceptions
|
||||
2. Request URI's that cause status codes >= 400
|
||||
The default is "true", so you must specify "false" to prevent
|
||||
the debug information from appearing. Since the debugging
|
||||
information reveals internal details about what Tomcat is serving,
|
||||
set showDebugInfo="false" if you wish increased security.
|
||||
-->
|
||||
<ContextManager debug="0" workDir="work" showDebugInfo="true" >
|
||||
<!-- ==================== Interceptors ==================== -->
|
||||
|
||||
<!--
|
||||
ContextInterceptor className="org.apache.tomcat.context.LogEvents"
|
||||
-->
|
||||
|
||||
<ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
|
||||
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.WebXmlReader" />
|
||||
|
||||
<!-- Uncomment out if you have JDK1.2 and want to use policy
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.PolicyInterceptor" />
|
||||
-->
|
||||
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.LoaderInterceptor" />
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.DefaultCMSetter" />
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.WorkDirInterceptor" />
|
||||
|
||||
<!-- Request processing -->
|
||||
<!-- Session interceptor will extract the session id from cookies and
|
||||
deal with URL rewriting ( by fixing the URL ). If you wish to
|
||||
suppress the use of cookies for session identifiers, change the
|
||||
"noCookies" attribute to "true"
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.SessionInterceptor"
|
||||
noCookies="false" />
|
||||
|
||||
<!-- Find the container ( context and prefix/extension map )
|
||||
for a request.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.SimpleMapper1"
|
||||
debug="0" />
|
||||
|
||||
<!-- Non-standard invoker, for backward compat. ( /servlet/* )
|
||||
You can modify the prefix that is matched by adjusting the
|
||||
"prefix" parameter below. Be sure your modified pattern
|
||||
starts and ends with a slash.
|
||||
|
||||
NOTE: This prefix applies to *all* web applications that
|
||||
are running in this instance of Tomcat.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.InvokerInterceptor"
|
||||
debug="0" prefix="/servlet/" />
|
||||
|
||||
<!-- "default" handler - static files and dirs. Set the
|
||||
"suppress" property to "true" to suppress directory listings
|
||||
when no welcome file is present.
|
||||
|
||||
NOTE: This setting applies to *all* web applications that
|
||||
are running in this instance of Tomcat.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.StaticInterceptor"
|
||||
debug="0" suppress="false" />
|
||||
|
||||
<!-- Plug a session manager. You can plug in more advanced session
|
||||
modules.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.session.StandardSessionInterceptor" />
|
||||
|
||||
<!-- Check if the request requires an authenticated role.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.AccessInterceptor"
|
||||
debug="0" />
|
||||
|
||||
<!-- Check permissions using the simple xml file. You can
|
||||
plug more advanced authentication modules.
|
||||
-->
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.SimpleRealm"
|
||||
debug="0" />
|
||||
|
||||
<!-- UnComment the following and comment out the
|
||||
above to get a JDBC realm.
|
||||
Other options for driverName:
|
||||
driverName="oracle.jdbc.driver.OracleDriver"
|
||||
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
|
||||
connectionName="scott"
|
||||
connectionPassword="tiger"
|
||||
|
||||
driverName="org.gjt.mm.mysql.Driver"
|
||||
connectionURL="jdbc:mysql://localhost/authority"
|
||||
connectionName="test"
|
||||
connectionPassword="test"
|
||||
|
||||
"connectionName" and "connectionPassword" are optional.
|
||||
-->
|
||||
<!--
|
||||
<RequestInterceptor
|
||||
className="org.apache.tomcat.request.JDBCRealm"
|
||||
debug="99"
|
||||
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
|
||||
connectionURL="jdbc:odbc:TOMCAT"
|
||||
userTable="users"
|
||||
userNameCol="user_name"
|
||||
userCredCol="user_pass"
|
||||
userRoleTable="user_roles"
|
||||
roleNameCol="role_name" />
|
||||
-->
|
||||
|
||||
<!-- Loaded last since JSP's that load-on-startup use request handling -->
|
||||
<ContextInterceptor
|
||||
className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
|
||||
|
||||
<!-- ==================== Connectors ==================== -->
|
||||
|
||||
<!-- Normal HTTP -->
|
||||
<!--
|
||||
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
|
||||
<Parameter name="handler"
|
||||
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
|
||||
<Parameter name="port"
|
||||
value="8080"/>
|
||||
</Connector>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Uncomment this for SSL support.
|
||||
You _need_ to set up a server certificate if you want this
|
||||
to work, and you need JSSE.
|
||||
1. Add JSSE jars to CLASSPATH
|
||||
2. Edit java.home/jre/lib/security/java.security
|
||||
Add:
|
||||
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
|
||||
3. Do: keytool -genkey -alias tomcat -keyalg RSA
|
||||
RSA is essential to work with Netscape and IIS.
|
||||
Use "changeit" as password. ( or add keypass attribute )
|
||||
You don't need to sign the certificate.
|
||||
|
||||
You can set parameter keystore and keypass if you want
|
||||
to change the default ( user.home/.keystore with changeit )
|
||||
-->
|
||||
<!--
|
||||
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
|
||||
<Parameter name="handler"
|
||||
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
|
||||
<Parameter name="port"
|
||||
value="8443"/>
|
||||
<Parameter name="socketFactory"
|
||||
value="org.apache.tomcat.net.SSLSocketFactory" />
|
||||
</Connector>
|
||||
-->
|
||||
|
||||
<!-- Apache AJP12 support. This is also used to shut down tomcat.
|
||||
-->
|
||||
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
|
||||
<Parameter name="handler"
|
||||
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
|
||||
<Parameter name="port" value="8007"/>
|
||||
</Connector>
|
||||
|
||||
<!-- ==================== Special webapps ==================== -->
|
||||
<!-- You don't need this if you place your app in webapps/
|
||||
and use defaults.
|
||||
For security you'll also need to edit tomcat.policy
|
||||
|
||||
Defaults are: debug=0, reloadable=true, trusted=false
|
||||
(trusted allows you to access tomcat internal objects
|
||||
with FacadeManager ), crossContext=true (allows you to
|
||||
access other contexts via ServletContext.getContext())
|
||||
|
||||
If security manager is enabled, you'll have read perms.
|
||||
in the webapps dir and read/write in the workdir.
|
||||
-->
|
||||
|
||||
<!--
|
||||
<Context path="/examples"
|
||||
docBase="webapps/examples"
|
||||
crossContext="false"
|
||||
debug="0"
|
||||
reloadable="true" >
|
||||
</Context>
|
||||
-->
|
||||
|
||||
<!-- Admin context will use tomcat.core to add/remove/get info about
|
||||
the webapplications and tomcat internals.
|
||||
By default it is not trusted - i.e. it is not allowed access to
|
||||
tomcat internals, only informations that are available to all
|
||||
servlets are visible.
|
||||
|
||||
If you change this to true, make sure you set a password.
|
||||
-->
|
||||
|
||||
<!--
|
||||
<Context path="/admin"
|
||||
docBase="webapps/admin"
|
||||
crossContext="true"
|
||||
debug="0"
|
||||
reloadable="true"
|
||||
trusted="false" >
|
||||
</Context>
|
||||
-->
|
||||
|
||||
<!-- Virtual host example -
|
||||
In "127.0.0.1" virtual host we'll reverse "/" and
|
||||
"/examples"
|
||||
(XXX need a better example )
|
||||
(use "http://127.0.0.1/examples" )
|
||||
<Host name="127.0.0.1" >
|
||||
<Context path=""
|
||||
docBase="webapps/examples" />
|
||||
<Context path="/examples"
|
||||
docBase="webapps/ROOT" />
|
||||
</Host>
|
||||
-->
|
||||
<Context path=""
|
||||
docBase="/var/www/htdocs" />
|
||||
</ContextManager>
|
||||
</Server>
|
29
www/jserv/pkg/DEINSTALL
Normal file
29
www/jserv/pkg/DEINSTALL
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/06/17 12:22:17 reinhard Exp $
|
||||
#
|
||||
# jserv de-installation
|
||||
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
CONF=`apxs -q SYSCONFDIR`/httpd.conf
|
||||
|
||||
rm -f /usr/lib/apache/modules/mod_jserv.so
|
||||
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package you"
|
||||
echo "| need to perform these steps as root:"
|
||||
echo "|"
|
||||
echo "| edit ${CONF}"
|
||||
echo "| and remove the lines
|
||||
echo "| 'LoadModule jserv_module'"
|
||||
echo "| and"
|
||||
echo "| 'include /etc/tomcat/tomcat-apache.conf'"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing jserv"
|
||||
echo "| package at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
|
||||
exit 0
|
5
www/jserv/pkg/DESCR
Normal file
5
www/jserv/pkg/DESCR
Normal file
@ -0,0 +1,5 @@
|
||||
Tomcat is the Java Servlet / Java Server Page environment produced
|
||||
by the Apache Foundation's Jakarta Project. This package provides
|
||||
the Apache Tomcat connector.
|
||||
|
||||
WWW: ${HOMEPAGE}
|
47
www/jserv/pkg/INSTALL
Normal file
47
www/jserv/pkg/INSTALL
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: INSTALL,v 1.1.1.1 2001/06/17 12:22:17 reinhard Exp $
|
||||
#
|
||||
# jserv installation
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To finish the install, you need to enable the jserv"
|
||||
echo "| module using the following command"
|
||||
echo "|"
|
||||
echo "| $PREFIX/sbin/jserv-enable"
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
: nothing to pre-install for this port
|
||||
;;
|
||||
POST-INSTALL)
|
||||
do_notice $1
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
5
www/jserv/pkg/PLIST
Normal file
5
www/jserv/pkg/PLIST
Normal file
@ -0,0 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/06/17 12:22:17 reinhard Exp $
|
||||
lib/mod_jserv.so
|
||||
sbin/jserv-enable
|
||||
share/examples/jserv/server.xml
|
||||
@dirrm share/examples/jserv
|
Loading…
Reference in New Issue
Block a user