yoavs 2004/08/21 08:50:12 Modified: catalina/src/bin Tag: TOMCAT_5_0 catalina.bat catalina.sh setclasspath.bat setclasspath.sh catalina/src/share/org/apache/catalina/realm Tag: TOMCAT_5_0 JAASRealm.java catalina/src/share/org/apache/catalina/ssi Tag: TOMCAT_5_0 SSIServlet.java catalina/src/share/org/apache/catalina/valves Tag: TOMCAT_5_0 ErrorReportValve.java ExtendedAccessLogValve.java catalina/src/share/org/apache/naming/factory Tag: TOMCAT_5_0 BeanFactory.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters Tag: TOMCAT_5_0 SetCharacterEncodingFilter.java webapps/docs Tag: TOMCAT_5_0 changelog.xml index.xml jndi-datasource-examples-howto.xml jndi-resources-howto.xml manager-howto.xml project.xml realm-howto.xml status.xml webapps/docs/config Tag: TOMCAT_5_0 ajp.xml globalresources.xml http.xml Log: Back-ported CVS HEAD patches to TOMCAT_5_0 for 5.0.28 release. Revision Changes Path No revision No revision 1.9.2.1 +8 -1 jakarta-tomcat-catalina/catalina/src/bin/catalina.bat Index: catalina.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.bat,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- catalina.bat 26 May 2004 20:04:01 -0000 1.9 +++ catalina.bat 21 Aug 2004 15:49:47 -0000 1.9.2.1 @@ -106,6 +106,7 @@ if ""%1"" == ""run"" goto doRun if ""%1"" == ""start"" goto doStart if ""%1"" == ""stop"" goto doStop +if ""%1"" == ""version"" goto doVersion echo Usage: catalina ( commands ... ) echo commands: @@ -117,6 +118,7 @@ echo start Start Catalina in a separate window echo start -security Start in a separate window with security manager echo stop Stop Catalina +echo version What version of tomcat are you running? goto end :doDebug @@ -155,6 +157,11 @@ shift set ACTION=stop goto execCmd + +:doVersion +%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo +goto end + :execCmd rem Get remaining unshifted command line arguments and save them in the 1.13.2.1 +18 -8 jakarta-tomcat-catalina/catalina/src/bin/catalina.sh Index: catalina.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.sh,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -u -r1.13 -r1.13.2.1 --- catalina.sh 26 May 2004 19:45:33 -0000 1.13 +++ catalina.sh 21 Aug 2004 15:49:49 -0000 1.13.2.1 @@ -61,7 +61,10 @@ # Get standard environment variables PRGDIR=`dirname "$PRG"` -CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` + +# Only set CATALINA_HOME if not already set +[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` + if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then . "$CATALINA_HOME"/bin/setenv.sh fi @@ -72,7 +75,7 @@ [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"` [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` - [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --path --unix "$JSSE_HOME"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"` fi # For OS400 @@ -114,12 +117,12 @@ # For Cygwin, switch paths to Windows format before running java if $cygwin; then - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"` - CATALINA_BASE=`cygpath --path --windows "$CATALINA_BASE"` - CATALINA_TMPDIR=`cygpath --path --windows "$CATALINA_TMPDIR"` + JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` + CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"` + CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` + CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - JSSE_HOME=`cygpath --path --windows "$JSSE_HOME"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"` JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` fi @@ -254,6 +257,12 @@ fi fi +elif [ "$1" = "version" ] ; then + + "$_RUNJAVA" \ + -classpath "$CATALINA_HOME/server/lib/catalina.jar" \ + org.apache.catalina.util.ServerInfo + else echo "Usage: catalina.sh ( commands ... )" @@ -272,6 +281,7 @@ echo " start -security Start in a separate window with security manager" echo " stop Stop Catalina" echo " stop -force Stop Catalina (followed by kill -KILL)" + echo " version What version of tomcat are you running?" exit 1 fi 1.6.2.1 +2 -2 jakarta-tomcat-catalina/catalina/src/bin/setclasspath.bat Index: setclasspath.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/setclasspath.bat,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- setclasspath.bat 12 Feb 2004 21:38:56 -0000 1.6 +++ setclasspath.bat 21 Aug 2004 15:49:50 -0000 1.6.2.1 @@ -52,6 +52,6 @@ goto end :exit -exit +exit /b 1 :end 1.7.2.1 +5 -4 jakarta-tomcat-catalina/catalina/src/bin/setclasspath.sh Index: setclasspath.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/setclasspath.sh,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- setclasspath.sh 12 Feb 2004 21:38:56 -0000 1.7 +++ setclasspath.sh 21 Aug 2004 15:49:50 -0000 1.7.2.1 @@ -11,13 +11,14 @@ exit 1 fi if $os400; then - if [ ! -r "$JAVA_HOME"/bin/java -o ! -r "$JAVA_HOME"/bin/javac ]; then + if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then echo "The JAVA_HOME environment variable is not defined correctly" echo "This environment variable is needed to run this program" + echo "NB: JAVA_HOME should point to a JDK not a JRE" exit 1 fi else - if [ ! -r "$JAVA_HOME"/bin/java -o ! -r "$JAVA_HOME"/bin/jdb -o ! -r "$JAVA_HOME"/bin/javac ]; then + if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then echo "The JAVA_HOME environment variable is not defined correctly" echo "This environment variable is needed to run this program" echo "NB: JAVA_HOME should point to a JDK not a JRE" @@ -29,7 +30,7 @@ echo "This environment variable is needed to run this program" exit 1 fi -if [ ! -r "$BASEDIR"/bin/setclasspath.sh ]; then +if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then echo "The BASEDIR environment variable is not defined correctly" echo "This environment variable is needed to run this program" exit 1 No revision No revision 1.6.2.1 +40 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASRealm.java Index: JAASRealm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASRealm.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- JAASRealm.java 27 Feb 2004 14:58:45 -0000 1.6 +++ JAASRealm.java 21 Aug 2004 15:49:53 -0000 1.6.2.1 @@ -90,6 +90,7 @@ * </ul> * * @author Craig R. McClanahan + * @author Yoav Shapira * @version $Revision$ $Date$ */ @@ -139,6 +140,13 @@ */ protected ArrayList userClasses = new ArrayList(); + /** + * Whether to use context ClassLoader or default ClassLoader. + * True means use context ClassLoader, and True is the default + * value. + */ + protected boolean useContextClassLoader = true; + // ------------------------------------------------------------- Properties @@ -158,6 +166,27 @@ return appName; } + /** + * Sets whether to use the context or default ClassLoader. + * True means use context ClassLoader. + * + * @param useContext True means use context ClassLoader + */ + public void setUseContextClassLoader(boolean useContext) { + useContextClassLoader = useContext; + log.info("Setting useContextClassLoader = " + useContext); + } + + /** + * Returns whether to use the context or default ClassLoader. + * True means to use the context ClassLoader. + * + * @return The value of useContextClassLoader + */ + public boolean isUseContextClassLoader() { + return useContextClassLoader; + } + public void setContainer(Container container) { super.setContainer(container); String name=container.getName(); @@ -258,9 +287,13 @@ log.debug("Authenticating " + appName + " " + username); // What if the LoginModule is in the container class loader ? - // - ClassLoader ocl=Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); + ClassLoader ocl = null; + + if (isUseContextClassLoader()) { + ocl=Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); + } + try { loginContext = new LoginContext (appName, new JAASCallbackHandler(this, username, @@ -269,7 +302,9 @@ log.error(sm.getString("jaasRealm.unexpectedError"), e); return (null); } finally { - Thread.currentThread().setContextClassLoader(ocl); + if( isUseContextClassLoader()) { + Thread.currentThread().setContextClassLoader(ocl); + } } if( log.isDebugEnabled()) No revision No revision 1.6.2.1 +6 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ssi/SSIServlet.java Index: SSIServlet.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ssi/SSIServlet.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- SSIServlet.java 27 Feb 2004 14:58:47 -0000 1.6 +++ SSIServlet.java 21 Aug 2004 15:49:53 -0000 1.6.2.1 @@ -164,7 +164,11 @@ return; } - res.setContentType("text/html;charset=UTF-8"); + String resourceMimeType = servletContext.getMimeType(path); + if(resourceMimeType == null) { + resourceMimeType = "text/html;charset=UTF-8"; + } + res.setContentType(resourceMimeType); if (expires != null) { res.setDateHeader("Expires", ( No revision No revision 1.17.2.1 +7 -8 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java Index: ErrorReportValve.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -r1.17 -r1.17.2.1 --- ErrorReportValve.java 26 May 2004 16:28:13 -0000 1.17 +++ ErrorReportValve.java 21 Aug 2004 15:49:55 -0000 1.17.2.1 @@ -51,6 +51,7 @@ * @author Craig R. McClanahan * @author <a href="mailto:[EMAIL PROTECTED]">Nicola Ken Barozzi</a> Aisa * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> + * @author Yoav Shapira * @version $Revision$ $Date$ */ @@ -308,19 +309,17 @@ try { - Writer writer = response.getReporter(); - - if (writer != null) { - - Locale locale = Locale.getDefault(); - try { hres.setContentType("text/html"); - hres.setLocale(locale); + hres.setCharacterEncoding("utf-8"); } catch (Throwable t) { if (debug >= 1) log("status.setContentType", t); } + + Writer writer = response.getReporter(); + + if (writer != null) { // If writer is null, it's an indication that the response has // been hard committed already, which should never happen 1.8.2.1 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java Index: ExtendedAccessLogValve.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- ExtendedAccessLogValve.java 27 Feb 2004 14:58:52 -0000 1.8 +++ ExtendedAccessLogValve.java 21 Aug 2004 15:49:56 -0000 1.8.2.1 @@ -1340,7 +1340,7 @@ } else if ("requestedSessionIdFromCookie".equals(fieldInfo.value)){ fieldInfo.location = FieldInfo.X_LOC_REQUESTEDSESSIONIDFROMCOOKIE; } else if ("requestedSessionIdValid".equals(fieldInfo.value)){ - fieldInfo.location = FieldInfo.X_LOC_REQUESTEDSESSIONID; + fieldInfo.location = FieldInfo.X_LOC_REQUESTEDSESSIONIDVALID; } else if ("contentLength".equals(fieldInfo.value)){ fieldInfo.location = FieldInfo.X_LOC_CONTENTLENGTH; } else if ("characterEncoding".equals(fieldInfo.value)){ No revision No revision 1.2.2.1 +3 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/factory/BeanFactory.java Index: BeanFactory.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/factory/BeanFactory.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- BeanFactory.java 27 Feb 2004 14:58:54 -0000 1.2 +++ BeanFactory.java 21 Aug 2004 15:50:00 -0000 1.2.2.1 @@ -186,6 +186,9 @@ } else if (propType.equals(Double.class) || propType.equals(double.class)) { valueArray[0] = new Double(value); + } else if (propType.equals(Boolean.class) + || propType.equals(boolean.class)) { + valueArray[0] = new Boolean(value); } else { throw new NamingException ("String conversion for property type '" No revision No revision 1.2.2.1 +2 -2 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java Index: SetCharacterEncodingFilter.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/filters/SetCharacterEncodingFilter.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- SetCharacterEncodingFilter.java 27 Feb 2004 14:59:03 -0000 1.2 +++ SetCharacterEncodingFilter.java 21 Aug 2004 15:50:01 -0000 1.2.2.1 @@ -15,7 +15,7 @@ */ -package filters; +package org.apache.webapp.admin.filters; import java.io.IOException; No revision No revision 1.70.2.6 +55 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.70.2.5 retrieving revision 1.70.2.6 diff -u -r1.70.2.5 -r1.70.2.6 --- changelog.xml 21 Aug 2004 12:29:20 -0000 1.70.2.5 +++ changelog.xml 21 Aug 2004 15:50:03 -0000 1.70.2.6 @@ -17,6 +17,27 @@ <section name="Tomcat 5.0.28"> <subsection name="General"> <changelog> + <fix> + <bug>30239</bug>: Updated IIS how-to to link to Wiki page with instrutions for IIS 5 and IIS 6 configurations. (yoavs) + </fix> + <fix> + <bug>30238</bug>: Replaced isapi_redirector.dll isapi_redirect.dll in installation script for consistency. (yoavs) + </fix> + <fix> + <bug>29584</bug>: Enhanced and clarified JNDI documentation. (yoavs) + </fix> + <fix> + <bug>30245</bug>: Corrected Connector documentation to list "address" as a common attribute. (yoavs) + </fix> + <fix> + <bug>29826</bug>: Modified setclasspath.bat exit code to 1. (yoavs) + </fix> + <update> + Updated status page, mostly rewritten. (yoavs) + </update> + <update> + Updated Jakarta-Commons dependencies: BeanUtils to 1.7.0, Collections to 3.1. (yoavs) + </update> </changelog> </subsection> @@ -26,6 +47,33 @@ <bug>30602</bug>: Subject is not available during the first call to the servlet which use the basic authentication (jfarcand) </fix> <fix> + <bug>29831</bug>: Added support for Boolean property to BeanFactory. (yoavs) + </fix> + <fix> + <bug>28875</bug>: Made ErrorReportValve use UTF-8 encoding by default. (yoavs) + </fix> + <fix> + <bug>30325</bug>: Only set CATALINA_HOME if not already set (in bin/catalina.sh). (yoavs) + </fix> + <fix> + <bug>30144</bug>: Made SSIServlet check resource MimeType before using text/html and UTF-8 default. (yoavs) + </fix> + <fix> + <bug>29406</bug>: Made JAASRealm configurable as to whether it should use the context ClassLoader or the default ClassLoader by adding a useContextClassLoader boolean attribute. (yoavs) + </fix> + <fix> + If ServletResponse.getWriter() is called and no char encoding has been specified, set response char encoding to default (ISO-8859-1) so that it is reflected in getContentType() and Content-Type header, as required by the Servlet Spec (Bugtraq 6152759) (luehe) + </fix> + <fix> + <bug>29869</bug>: Better JMX/JSR77 support in StandardContext and StandardWrapper. (remm) + </fix> + <update> + Fixed broken link to JK documenration from AJP Connector reference page. (yoavs) + </update> + <fix> + <bug>30587</bug>: Typo in ExtendedAccessLogValve. (yoavs) + </fix> + <fix> <bug>30561</bug>: Broken restart of NamingService. (yoavs) </fix> </changelog> @@ -66,6 +114,12 @@ <subsection name="Webapps"> <changelog> + <fix> + <bug>29779</bug>: Admin/Examples SetCharacterEncodingFilter wrong package. (yoavs) + </fix> + <fix> + <bug>30354</bug>: manager-howto.xml used wrong Ant task. (yoavs) + </fix> </changelog> </subsection> @@ -77,7 +131,7 @@ <update>Updated dependencies on commons-dbcp (to 1.2.1), commons-pool (to 1.2), and commons-logging (to 1.0.4). (yoavs) </update> <fix> - <bug>29368</bug>: Replaced references to xmlParserAPIs.jar with xml-apis.jar, as the former is now deprecated in Xerces. Users wishing to use old versions of Xerces that don't have xml-apis.jar can still do so without a problem. Users wishing to build tomcat using xmlParserAPIs.jar instead of xml-apis.jar can also do so with a trivial edit in the build.xml file. + <bug>29368</bug>: Replaced references to xmlParserAPIs.jar with xml-apis.jar, as the former is now deprecated in Xerces. Users wishing to use old versions of Xerces that don't have xml-apis.jar can still do so without a problem. Users wishing to build tomcat using xmlParserAPIs.jar instead of xml-apis.jar can also do so with a trivial edit in the build.xml file. (yoavs) </fix> </changelog> </subsection> 1.15.2.1 +1 -1 jakarta-tomcat-catalina/webapps/docs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/index.xml,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -u -r1.15 -r1.15.2.1 --- index.xml 10 Jun 2004 20:34:41 -0000 1.15 +++ index.xml 21 Aug 2004 15:50:05 -0000 1.15.2.1 @@ -18,7 +18,7 @@ <section name="Introduction"> <p>This is the top-level entry point of the documentation bundle for the -<strong>Tomcat 5</strong> Servlet/JSP container. Tomcat 5 implements the +<strong>Apache Jakarta Tomcat</strong> Servlet/JSP container. Tomcat version 5 implements the Servlet 2.4 and JavaServer Pages 2.0 specifications from the <a href="http://www.jcp.org">Java Community Process</a>, and includes many additional features that make it a useful platform for developing and deploying 1.8.2.1 +2 -1 jakarta-tomcat-catalina/webapps/docs/jndi-datasource-examples-howto.xml Index: jndi-datasource-examples-howto.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/jndi-datasource-examples-howto.xml,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- jndi-datasource-examples-howto.xml 27 May 2004 18:33:11 -0000 1.8 +++ jndi-datasource-examples-howto.xml 21 Aug 2004 15:50:06 -0000 1.8.2.1 @@ -230,7 +230,8 @@ </parameter> <!-- Maximum number of idle dB connections to retain in pool. - Set to 0 for no limit. + Set to -1 for no limit. See also the DBCP documentation on this + and the minEvictableIdleTimeMillis configuration parameter. --> <parameter> <name>maxIdle</name> 1.5.2.1 +57 -12 jakarta-tomcat-catalina/webapps/docs/jndi-resources-howto.xml Index: jndi-resources-howto.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/jndi-resources-howto.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- jndi-resources-howto.xml 9 Aug 2003 18:59:22 -0000 1.5 +++ jndi-resources-howto.xml 21 Aug 2004 15:50:07 -0000 1.5.2.1 @@ -7,8 +7,9 @@ &project; <properties> - <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> - <title>JNDI Resources HOW-TO</title> + <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> + <author email="[EMAIL PROTECTED]">Yoav Shapira</author> + <title>JNDI Resources HOW-TO</title> </properties> <body> @@ -17,10 +18,42 @@ <section name="Introduction"> <p>Tomcat 5 provides a JNDI <strong>InitialContext</strong> implementation -instance to web applications running under it, in a manner that is compatible -with those provided by a <a href="http://java.sun.com/j2ee">Java2 Enterprise -Edition</a> application server. Entries in this <code>InitialContext</code> -are configured in the <code>$CATALINA_HOME/conf/server.xml</code> file, and +instance for each web application running under it, in a manner that is +compatible with those provided by a +<a href="http://java.sun.com/j2ee">Java2 Enterprise Edition</a> application +server. + +The J2EE standard provides a standard set of elements in +the <code>/WEB-INF/web.xml</code> file to reference resources; resources +referenced in these elements must be defined in an application-server-specific configuration. +</p> + +<p>For Tomcat 5, these entries in per-web-application +<code>InitialContext</code> are configured in the +<code><strong><Context></strong></code> or +<code><strong><DefaultContext></strong></code> +elements of the +<a href="config/server.html"><code><strong><Server></strong></code></a> +element. + +The <code><strong><Context></strong></code> element can be specified +in either <code>$CATALINA_HOME/conf/server.xml</code> or, preferably, +the per-web-application context XML file. + +<code><strong><DefaultContext></strong></code> must be specified in +<code>$CATALINA_HOME/conf/server.xml</code>. +</p> + +<p>Tomcat 5 maintains a separate namespace of global resources for the +entire server. These are configured in the +<a href="config/globalresources.html"> +<code><strong><GlobalNameingResources></strong></code></a> element of +<code>$CATALINA_HOME/conf/server.xml</code>. You may expose these resources to +web applications by using +<code><strong><ResourceLink></strong></code> elements. +</p> + +<p>The resources defined in these elements may be referenced by the following elements in the web application deployment descriptor (<code>/WEB-INF/web.xml</code>) of your web application:</p> <ul> @@ -39,10 +72,11 @@ <p>The <code>InitialContext</code> is configured as a web application is initially deployed, and is made available to web application components (for -read-only access). All configured entries and resources will be placed in +read-only access). All configured entries and resources are placed in the <code>java:comp/env</code> portion of the JNDI namespace, so a typical access to a resource - in this case, to a JDBC <code>DataSource</code> - would look something like this:</p> + <source> // Obtain our environment naming context Context initCtx = new InitialContext(); @@ -75,8 +109,9 @@ <section name="Configuring JNDI Resources"> <p>Each available JNDI Resource is configured based on inclusion of the -following elements in the <code>$CATALINA_HOME/conf/server.xml</code> -file:</p> +following elements in the <code><strong><Context></strong></code> or +<code><strong><DefaultContext></strong></code> elements:</p> + <ul> <li><a href="config/context.html#Environment Entries"><Environment></a> - Configure names and values for scalar environment entries that will be @@ -89,12 +124,20 @@ application (equivalent to the inclusion of a <code><resource-ref></code> element in the web application deployment descriptor).</li> -<li><a href="config/context.html#Resource Parameters"><ResourceParams></a> - + +<li> + <a href="config/context.html#Resource Parameters"><ResourceParams></a> - Configure the Java class name of the resource factory implementation to be used, as well as JavaBeans properties used to configure that resource factory.</li> + <li><a href="config/context.html#Resource Links"><ResourceLink></a> - - Add a link to a resource defined in the global JNDI context.</li> + Add a link to a resource defined in the global JNDI context. Use resource + links to give a web application access to a resource defined in + the<a href="config/globalresources.html"><GlobalNamingResources></a> + child element of the <a href="config/server.html"><Server></a> + element.</li> + </ul> <p>Any number of these elements may be nested inside a @@ -116,7 +159,9 @@ the resource elements described above to the <a href="config/globalresources.html"><GlobalNamingResources></a> child element of the <a href="config/server.html"><Server></a> -element.</p> +element and using a +<a href="config/context.html#Resource Links"><ResourceLink></a> to +include it in the per-web-application context.</p> </section> 1.12.2.1 +1 -1 jakarta-tomcat-catalina/webapps/docs/manager-howto.xml Index: manager-howto.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/manager-howto.xml,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -r1.12 -r1.12.2.1 --- manager-howto.xml 19 Dec 2003 18:59:44 -0000 1.12 +++ manager-howto.xml 21 Aug 2004 15:50:07 -0000 1.12.2.1 @@ -981,7 +981,7 @@ </target> <target name="undeploy" description="Remove web application"> - <remove url="${url}" username="${username}" password="${password}" + <undeploy url="${url}" username="${username}" password="${password}" path="${path}"/> </target> 1.21.2.1 +3 -3 jakarta-tomcat-catalina/webapps/docs/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/project.xml,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- project.xml 10 Jun 2004 20:34:41 -0000 1.21 +++ project.xml 21 Aug 2004 15:50:07 -0000 1.21.2.1 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<project name="Tomcat Documentation - Top Level Directory" +<project name="Apache Jakarta Tomcat Documentation - Top Level Directory" href="http://jakarta.apache.org/tomcat/"> - <title>The Tomcat 5 Servlet/JSP Container</title> + <title>The Apache Jakarta Tomcat 5 Servlet/JSP Container</title> <logo href="/images/tomcat.gif"> - The Tomcat Servlet/JSP Container + The Apache Jakarta Tomcat Servlet/JSP Container </logo> 1.14.2.1 +14 -10 jakarta-tomcat-catalina/webapps/docs/realm-howto.xml Index: realm-howto.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/realm-howto.xml,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- realm-howto.xml 24 Feb 2004 12:17:22 -0000 1.14 +++ realm-howto.xml 21 Aug 2004 15:50:08 -0000 1.14.2.1 @@ -328,9 +328,10 @@ roles) are cached within Tomcat for the duration of the user's login. (For FORM-based authentication, that means until the session times out or is invalidated; for BASIC authentication, that means until the user - closes their browser). Any changes to the database information for an - already authenticated user will <strong>not</strong> be reflected until - the next time that user logs on again.</li> + closes their browser). The cached user is <strong>not</strong> saved and + restored across sessions serialisations. Any changes to the database + information for an already authenticated user will <strong>not</strong> be + reflected until the next time that user logs on again.</li> <li>Administering the information in the <em>users</em> and <em>user roles</em> table is the responsibility of your own applications. Tomcat does not provide any built-in capabilities to maintain users and roles.</li> @@ -511,9 +512,10 @@ roles) are cached within Tomcat for the duration of the user's login. (For FORM-based authentication, that means until the session times out or is invalidated; for BASIC authentication, that means until the user - closes their browser). Any changes to the database information for an - already authenticated user will <strong>not</strong> be reflected until - the next time that user logs on again.</li> + closes their browser). The cached user is <strong>not</strong> saved and + restored across sessions serialisations. Any changes to the database + information for an already authenticated user will <strong>not</strong> be + reflected until the next time that user logs on again.</li> <li>Administering the information in the <em>users</em> and <em>user roles</em> table is the responsibility of your own applications. Tomcat does not provide any built-in capabilities to maintain users and roles.</li> @@ -1058,9 +1060,10 @@ roles) are cached within Tomcat for the duration of the user's login. (For FORM-based authentication, that means until the session times out or is invalidated; for BASIC authentication, that means until the user - closes their browser). Any changes to the directory information for an - already authenticated user will <strong>not</strong> be reflected until - the next time that user logs on again.</li> + closes their browser). The cached user is <strong>not</strong> saved and + restored across sessions serialisations. Any changes to the directory + information for an already authenticated user will <strong>not</strong> be + reflected until the next time that user logs on again.</li> <li>Administering the information in the directory server is the responsibility of your own applications. Tomcat does not provide any built-in capabilities to maintain users and roles.</li> @@ -1168,7 +1171,8 @@ roles) are cached within Tomcat for the duration of the user's login. (For FORM-based authentication, that means until the session times out or is invalidated; for BASIC authentication, that means until the user - closes their browser).</li> + closes their browser). The cached user is <strong>not</strong> saved and + restored across sessions serialisations.</li> <li>Administering the information in the users file is the responsibility of your application. Tomcat does not provide any built-in capabilities to maintain users and roles.</li> 1.5.2.1 +61 -17 jakarta-tomcat-catalina/webapps/docs/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/status.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- status.xml 4 Aug 2003 08:31:24 -0000 1.5 +++ status.xml 21 Aug 2004 15:50:08 -0000 1.5.2.1 @@ -8,10 +8,59 @@ <properties> <author email="[EMAIL PROTECTED]">Remy Maucherat</author> + <author email="[EMAIL PROTECTED]">Yoav Shapira</author> <title>Project Status</title> </properties> <body> + <section name="Preface"> + <p> + This document attempts to convey the current status of Tomcat development + in "big picture" terms. This is not the place to check if an individual + bug report has been addressed or when an individual feature will be available. + </p> + <p> + This page is updated roughly once per every couple of Tomcat minor releases, + so for day-to-day status you should check the tomcat-user and tomcat-dev mailing + lists. You can always inquire there as to the availability or status of a + specific feature or component. + </p> + </section> + + <section name="Current Status Summary"> + <p> + <b>Tomcat 5.0.27</b> was released on June 17th, 2004. At that time, the TOMCAT_5_0 + branch was tagged in CVS, and work on Tomcat 5.1 (or 5.5, or 5.next, we haven't + decided yet) began. Until the first stable release of Tomcat 5.1, building from + CVS head may be unstable or broken: use the TOMCAT_5_0 branch tag to build + the Tomcat 5.0 releases. + </p> + <p> + <b>Tomcat 5.1</b> has several major goals. They are discussed in the tomcat-dev + mailing list's "5.next" thread: + <a href="http://marc.theaimsgroup.com/?l=tomcat-dev&w=2&r=1&s=5.next&q=b">MARC</a>. + The status of some of these items is detailed below. + </p> + <p> + <b>Tomcat 4.0.x</b> is relatively old, and not actively maintained or supported. + It is strongly recommended that users of these releases upgrade to the latest + stable Tomcat 5.0 release or at least the latest stable Tomcat 4.1 release. + </p> + <p> + <b>Tomcat 4.1.x</b> is no longer actively developed. It is maintained to address + only showstopper, security, and Servlet Specification compliance issues. Maintenance + for Tomcat 4.1.x will likely cease once a stable release or two of Tomcat 5.1 are out. + Users of Tomcat 4.1.x are strongly encouraged to upgrade to the latest stable Tomcat + 5.0 release. + </p> + <p> + <b>Tomcat 3.3.x</b> is in roughly the same maintenance mode as Tomcat 4.1.x. + </p> + <p> + <b>Tomcat 3.2</b> and earlier are in roughly the same support state as Tomcat 4.0.x. + Users should upgrade to Tomcat 3.3.x or the latest stable Tomcat 5.0.x. + </p> + </section> <section name="How to read the report"> @@ -43,28 +92,23 @@ <section name="TODO List"> <status> - <item priority="High" owner="remm, funkman, yoavs"> - Documentation updates for new user guide book. - </item> - <item priority="Medium" owner="---"> - Tag plugins for JSTL. + <item priority="High" owner="remm, costin"> + Refactor ClassLoaders for Tomcat 5.1. </item> - <item priority="Medium" owner="remm"> - Optimization of BASIC authentication handling. + <item priority="High" owner="remm"> + Refactor application deployment for Tomcat 5.1. </item> - <item priority="Low" owner="---"> - Optimization of DIGEST authentication handling. + <item priority="High" owner="remm"> + Remove Logger interface and implementation, use commons-logging everywhere. </item> - <item priority="Low" owner="---"> - Realm / auth refactoring (one of the goals would be to add better - support for DIGEST). + <item priority="Medium" owner="fhanik"> + Enhance Cluster functionality for Tomcat 5.1. </item> - <item priority="Low" owner="---"> - GUI for the deployer. + <item priority="Low" owner="yoavs, funkman"> + Update docs, site, and FAQ for Tomcat 5.1 once ready. </item> - <item priority="Low" owner="---"> - Java load balancer / cache (?) for use with Tomcat clustering, or - with session affinity. + <item priority="Low" owner="everyone"> + Continue fixing bugs ;) </item> </status> No revision No revision 1.4.2.1 +13 -3 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- ajp.xml 11 Jan 2004 09:20:22 -0000 1.4 +++ ajp.xml 21 Aug 2004 15:50:12 -0000 1.4.2.1 @@ -8,6 +8,7 @@ <properties> <author email="[EMAIL PROTECTED]">Remy Maucherat</author> + <author email="[EMAIL PROTECTED]">Yoav Shapira</author> <title>The AJP Connector</title> </properties> @@ -40,6 +41,13 @@ <attributes> + <attribute name="address" required="false"> + <p>For servers with more than one IP address, this attribute + specifies which address will be used for listening on the specified + port. By default, this port will be used on all IP addresses + associated with the server.</p> + </attribute> + <attribute name="allowTrace" required="false"> <p>A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false.</p> @@ -136,15 +144,17 @@ <section name="Nested Components"> - <p></p> + <p>None at this time.</p> </section> <section name="Configuration HOWTOs"> - <p>Please refer to the <a href="http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/">JK documentation</a> - for HOWTOs and complete configuration information.</p> + <p>Please refer to the +<a href="../../connectors-doc/jk2">JK documentation</a> + for HOW-TOs and complete configuration information. + </p> </section> 1.2.2.1 +48 -8 jakarta-tomcat-catalina/webapps/docs/config/globalresources.xml Index: globalresources.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/globalresources.xml,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- globalresources.xml 15 Jan 2003 03:40:44 -0000 1.2 +++ globalresources.xml 21 Aug 2004 15:50:12 -0000 1.2.2.1 @@ -8,6 +8,7 @@ <properties> <author email="[EMAIL PROTECTED]">Remy Maucherat</author> + <author email="[EMAIL PROTECTED]">Yoav Shapira</author> <title>The GlobalNamingResources Component</title> </properties> @@ -16,9 +17,19 @@ <section name="Introduction"> - <p>The <strong>GlobalNamingResources</strong> element represents the global - JNDI resources which are defined - for the <a href="server.html">Server</a>.</p> + <p>The <strong>GlobalNamingResources</strong> element defines the global + JNDI resources for the <a href="server.html">Server</a>.</p> + + <p>These resources are listed in the server's global JNDI resource context. + This context is distinct from the per-web-application JNDI contexts + described in + the <a href="../jndi-resources-howto.html">JNDI Resources HOW-TO</a>. + With the exception of <code><strong><Environment></strong></code> + values, + the resources defined in this element are <strong>not</strong> visible in + the per-web-application contexts unless you explicitly link them with + <a href="context.html#Resource Links"><ResourceLink></a> elements. + </p> </section> @@ -38,9 +49,9 @@ <subsection name="Environment Entries"> - <p>You can configure named values that will be made visible to - web applications as environment entry resources, by nesting - <code><Environment></code> entries inside this element. For + <p>You can configure named values that will be made visible to all + web applications as environment entry resources by nesting + <code><Environment></code> entries inside this element. For example, you can create an environment entry like this:</p> <source> <GlobalNamingResources ...> @@ -109,10 +120,16 @@ <subsection name="Resource Definitions"> - <p>You can declare the characteristics of the resource + <p>You can declare the characteristics of resources to be returned for JNDI lookups of <code><resource-ref></code> and <code><resource-env-ref></code> elements in the web application - deployment descriptor. You <strong>MUST</strong> also define + deployment descriptor by defining them in this element and then linking + them with <a href="context.html#Resource Links"><ResourceLink></a> + elements + in the <code><strong><Context></strong></code> + or <code><strong><DefaultContext></strong></code> elements. + + You <strong>MUST</strong> also define <a href="#Resource Parameters">Resource Parameters</a> for the same resource name, to configure the object factory to be used (if not known to Tomcat already), and @@ -186,6 +203,29 @@ </subsection> + <subsection name="Resource Links"> + <p>Use <a href="context.html#Resource Links"><ResourceLink></a> + elements to link resources from the global context into + per-web-application contexts. Here is an example of making a custom + factory available to all applications in the server, based on the example + definition in the + <a href="../jndi-resource-howto.html#Generic JavaBean Resources"> + JNDI Resource HOW-TO</a>: + </p> + + <source> + <![CDATA[ + <DefaultContext> + <ResourceLink + name="bean/MyBeanFactory" + global="bean/MyBeanFactory" + type="com.mycompany.MyBean" + /> + </DefaultContext> + ]]> + </source> + + </subsection> <subsection name="Resource Parameters"> 1.10.2.1 +7 -7 jakarta-tomcat-catalina/webapps/docs/config/http.xml Index: http.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/http.xml,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- http.xml 27 May 2004 16:08:51 -0000 1.10 +++ http.xml 21 Aug 2004 15:50:12 -0000 1.10.2.1 @@ -57,6 +57,13 @@ <attributes> + <attribute name="address" required="false"> + <p>For servers with more than one IP address, this attribute + specifies which address will be used for listening on the specified + port. By default, this port will be used on all IP addresses + associated with the server.</p> + </attribute> + <attribute name="allowTrace" required="false"> <p>A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false.</p> @@ -136,13 +143,6 @@ all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.</p> - </attribute> - - <attribute name="address" required="false"> - <p>For servers with more than one IP address, this attribute - specifies which address will be used for listening on the specified - port. By default, this port will be used on all IP addresses - associated with the server.</p> </attribute> <attribute name="bufferSize" required="false">
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]