Author: remy.maucherat(a)jboss.com
Date: 2008-01-17 18:57:39 -0500 (Thu, 17 Jan 2008)
New Revision: 400
Modified:
trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java
trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
trunk/java/org/apache/catalina/manager/LocalStrings.properties
trunk/java/org/apache/catalina/session/StandardManager.java
trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
trunk/res/tomcat.nsi
trunk/webapps/docs/changelog.xml
Log:
- HTML manager fix.
- Manager session count fix.
- Installer file selection fix (will need some more work).
Modified: trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
===================================================================
--- trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 2008-01-17 21:53:54
UTC (rev 399)
+++ trunk/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 2008-01-17 23:57:39
UTC (rev 400)
@@ -32,9 +32,8 @@
* <b>Definition</b>:
* <pre>
* <path id="catalina_ant">
- * <fileset dir="${catalina.home}/server/lib">
+ * <fileset dir="${catalina.home}/lib">
* <include name="catalina-ant.jar"/>
- * <include name="catalina-ant-jmx.jar"/>
* </fileset>
* </path>
*
Modified: trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java
===================================================================
--- trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java 2008-01-17
21:53:54 UTC (rev 399)
+++ trunk/java/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java 2008-01-17
23:57:39 UTC (rev 400)
@@ -32,9 +32,8 @@
* Definition
* <pre>
* <path id="catalina_ant">
- * <fileset dir="${catalina.home}/server/lib">
+ * <fileset dir="${catalina.home}/lib">
* <include name="catalina-ant.jar"/>
- * <include name="catalina-ant-jmx.jar"/>
* </fileset>
* </path>
*
Modified: trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
===================================================================
--- trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 2008-01-17 21:53:54 UTC
(rev 399)
+++ trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 2008-01-17 23:57:39 UTC
(rev 400)
@@ -382,7 +382,7 @@
Map.Entry entry = (Map.Entry) iterator.next();
String displayPath = (String) entry.getKey();
- String contextPath = (String) entry.getKey();
+ String contextPath = (String) entry.getValue();
Context context = (Context) host.findChild(contextPath);
if (displayPath.equals("")) {
displayPath = "/";
@@ -441,7 +441,12 @@
"/html/expire?path=" + displayPath);
args[9] = appsExpire;
args[10] = sm.getString("htmlManagerServlet.expire.explain");
- args[11] = new
Integer(context.getManager().getMaxInactiveInterval()/60);
+ if (context.getManager() == null) {
+ args[11] = sm.getString("htmlManagerServlet.noManager");
+ } else {
+ args[11] = new Integer(
+ context.getManager().getMaxInactiveInterval()/60);
+ }
args[12] = sm.getString("htmlManagerServlet.expire.unit");
args[13] = highlightColor;
Modified: trunk/java/org/apache/catalina/manager/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/catalina/manager/LocalStrings.properties 2008-01-17 21:53:54 UTC
(rev 399)
+++ trunk/java/org/apache/catalina/manager/LocalStrings.properties 2008-01-17 23:57:39 UTC
(rev 400)
@@ -31,6 +31,7 @@
htmlManagerServlet.list=List Applications
htmlManagerServlet.manager=Manager
htmlManagerServlet.messageLabel=Message:
+htmlManagerServlet.noManager=-
htmlManagerServlet.serverJVMVendor=JVM Vendor
htmlManagerServlet.serverJVMVersion=JVM Version
htmlManagerServlet.serverOSArch=OS Architecture
Modified: trunk/java/org/apache/catalina/session/StandardManager.java
===================================================================
--- trunk/java/org/apache/catalina/session/StandardManager.java 2008-01-17 21:53:54 UTC
(rev 399)
+++ trunk/java/org/apache/catalina/session/StandardManager.java 2008-01-17 23:57:39 UTC
(rev 400)
@@ -395,9 +395,10 @@
session.setManager(this);
sessions.put(session.getIdInternal(), session);
session.activate();
+ sessionCounter++;
}
} catch (ClassNotFoundException e) {
- log.error(sm.getString("standardManager.loading.cnfe", e), e);
+ log.error(sm.getString("standardManager.loading.cnfe", e), e);
if (ois != null) {
try {
ois.close();
@@ -408,7 +409,7 @@
}
throw e;
} catch (IOException e) {
- log.error(sm.getString("standardManager.loading.ioe", e), e);
+ log.error(sm.getString("standardManager.loading.ioe", e), e);
if (ois != null) {
try {
ois.close();
Modified: trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
===================================================================
--- trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2008-01-17
21:53:54 UTC (rev 399)
+++ trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2008-01-17
23:57:39 UTC (rev 400)
@@ -125,6 +125,7 @@
if (needCRLFParse) {
needCRLFParse = false;
+ // FIXME: parse CRLF could return 0 in NB
parseCRLF();
}
@@ -141,6 +142,7 @@
int result = 0;
if (pos >= lastValid) {
+ // FIXME: parse CRLF could return 0 in NB
readBytes();
}
@@ -154,7 +156,14 @@
chunk.setBytes(buf, pos, remaining);
pos = pos + remaining;
remaining = 0;
- needCRLFParse = true;
+ //we need a CRLF
+ if ((pos+1) >= lastValid) {
+ //if we call parseCRLF we overrun the buffer here
+ //so we defer it to the next call BZ 11117
+ needCRLFParse = true;
+ } else {
+ parseCRLF(); //parse the CRLF immediately
+ }
}
return result;
@@ -310,6 +319,7 @@
throws IOException {
boolean eol = false;
+ boolean crfound = false;
while (!eol) {
@@ -319,7 +329,10 @@
}
if (buf[pos] == Constants.CR) {
+ if (crfound) throw new IOException("Invalid CRLF, two CR characters
encountered.");
+ crfound = true;
} else if (buf[pos] == Constants.LF) {
+ if (!crfound) throw new IOException("Invalid CRLF, no CR character
encountered.");
eol = true;
} else {
throw new IOException("Invalid CRLF");
Modified: trunk/res/tomcat.nsi
===================================================================
--- trunk/res/tomcat.nsi 2008-01-17 21:53:54 UTC (rev 399)
+++ trunk/res/tomcat.nsi 2008-01-17 23:57:39 UTC (rev 400)
@@ -122,20 +122,26 @@
SetOutPath $INSTDIR
File tomcat.ico
File LICENSE
- File /r lib
- File /nonfatal /r logs
- File /nonfatal /r work
- File /nonfatal /r temp
+ SetOutPath $INSTDIR\lib
+ File /r lib\*.*
+ SetOutPath $INSTDIR\logs
+ File /nonfatal /r logs\*.*
+ SetOutPath $INSTDIR\work
+ File /nonfatal /r work\*.*
+ SetOutPath $INSTDIR\temp
+ File /nonfatal /r temp\*.*
SetOutPath $INSTDIR\bin
File bin\bootstrap.jar
File bin\tomcat-juli.jar
File bin\*.exe
SetOutPath $INSTDIR\conf
File conf\*.*
- SetOutPath $INSTDIR\webapps
- File /r webapps\ROOT
- File /r webapps\host-manager
- File /r webapps\manager
+ SetOutPath $INSTDIR\webapps\ROOT
+ File /r webapps\ROOT\*.*
+ SetOutPath $INSTDIR\webapps\host-manager
+ File /r webapps\host-manager\*.*
+ SetOutPath $INSTDIR\webapps\manager
+ File /r webapps\manager\*.*
Call configure
Call findJavaPath
@@ -271,8 +277,8 @@
Section "Documentation" SecDocs
SectionIn 1 3
- SetOutPath $INSTDIR\webapps
- File /r webapps\docs
+ SetOutPath $INSTDIR\webapps\docs
+ File /r webapps\docs\*.*
SectionEnd
@@ -281,8 +287,8 @@
SectionIn 3
SetOverwrite on
- SetOutPath $INSTDIR\webapps
- File /r webapps\examples
+ SetOutPath $INSTDIR\webapps\examples
+ File /r webapps\examples\*.*
SectionEnd
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-01-17 21:53:54 UTC (rev 399)
+++ trunk/webapps/docs/changelog.xml 2008-01-17 23:57:39 UTC (rev 400)
@@ -25,6 +25,10 @@
<fix>
Fix licensing problems with two xsd files. (remm)
</fix>
+ <update>
+ Update commons-logging to version 1.1.1 and the NSIS installer to 2.34.
+ (markt)
+ </update>
</changelog>
</subsection>
<subsection name="Catalina">
@@ -132,6 +136,9 @@
Add org.apache.catalina.loader.WebappClassLoader.SYSTEM_CL_DELEGATION boolean
system
property to avoid systematic system CL delegation if needed. (remm)
</fix>
+ <fix>
+ Set correct StandardManager.sessionCounter after reload/restart. (pero)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -200,6 +207,14 @@
<fix>
<bug>44088</bug>: Fix expire session button in manager. (markt)
</fix>
+ <fix>
+ <bug>43468</bug>: Fix possible NPE when listing contexts in the
Manager
+ application. (markt)
+ </fix>
+ <fix>
+ <bug>43515</bug>: Fix bug in Manager application that may have
caused
+ problems when listing contexts. Patch provided by Lucas Galfaso. (markt)
+ </fix>
</changelog>
</subsection>
</section>