Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 07:50:48 -0400 (Tue, 13 May 2008)
New Revision: 615
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
trunk/java/org/apache/jasper/compiler/Validator.java
trunk/webapps/docs/changelog.xml
Log:
- Two Tomcat ports, and a bugfix for charset case sensitivity in a rare case.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-13 10:29:12 UTC (rev
614)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-13 11:50:48 UTC (rev
615)
@@ -4291,15 +4291,6 @@
getCluster().registerManager(manager);
}
-
- // Start manager
- if ((manager != null) && (manager instanceof Lifecycle)) {
- ((Lifecycle) getManager()).start();
- }
-
- // Start ContainerBackgroundProcessor thread
- super.threadStart();
-
mainOk = true;
}
@@ -4360,14 +4351,28 @@
lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
}
- // Configure and call application event listeners and filters
+ // Configure and call application event listeners
if (ok) {
if (!listenerStart()) {
log.error( "Error listenerStart");
ok = false;
}
}
+
+ // Start manager
+ if (ok && (manager != null) && (manager instanceof
Lifecycle)) {
+ ok = false;
+ ((Lifecycle) getManager()).start();
+ ok = true;
+ }
+
+ // Start ContainerBackgroundProcessor thread
if (ok) {
+ super.threadStart();
+ }
+
+ // Configure and call application filters
+ if (ok) {
if (!filterStart()) {
log.error( "Error filterStart");
ok = false;
Modified: trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspDocumentParser.java 2008-05-13 10:29:12 UTC
(rev 614)
+++ trunk/java/org/apache/jasper/compiler/JspDocumentParser.java 2008-05-13 11:50:48 UTC
(rev 615)
@@ -278,8 +278,11 @@
return;
}
+ String currentPrefix = getPrefix(current.getQName());
+
// jsp:text must not have any subelements
- if (JSP_URI.equals(uri) && TEXT_ACTION.equals(current.getLocalName())) {
+ if (JSP_URI.equals(uri) && TEXT_ACTION.equals(current.getLocalName())
+ && "jsp".equals(currentPrefix)) {
throw new SAXParseException(
Localizer.getMessage("jsp.error.text.has_subelement"),
locator);
@@ -1175,11 +1178,7 @@
}
}
- String prefix = "";
- int colon = qName.indexOf(':');
- if (colon != -1) {
- prefix = qName.substring(0, colon);
- }
+ String prefix = getPrefix(qName);
Node.CustomTag ret = null;
if (tagInfo != null) {
@@ -1366,9 +1365,8 @@
*/
private void checkPrefix(String uri, String qName) {
- int index = qName.indexOf(':');
- if (index != -1) {
- String prefix = qName.substring(0, index);
+ String prefix = getPrefix(qName);
+ if (prefix.length() > 0) {
pageInfo.addPrefix(prefix);
if ("jsp".equals(prefix) && !JSP_URI.equals(uri)) {
pageInfo.setIsJspPrefixHijacked(true);
@@ -1376,6 +1374,14 @@
}
}
+ private String getPrefix(String qName) {
+ int index = qName.indexOf(':');
+ if (index != -1) {
+ return qName.substring(0, index);
+ }
+ return "";
+ }
+
/*
* Gets SAXParser.
*
Modified: trunk/java/org/apache/jasper/compiler/Validator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-13 10:29:12 UTC (rev
614)
+++ trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-13 11:50:48 UTC (rev
615)
@@ -328,6 +328,7 @@
Node.Root root = pageDir.getRoot();
String configEnc = root.getJspConfigPageEncoding();
+ pageDirEnc = pageDirEnc.toUpperCase();
/*
* Compare the 'pageEncoding' attribute of the page directive with
@@ -336,9 +337,8 @@
* "UTF-16LE" as identical.
*/
if (configEnc != null) {
- if (!pageDirEnc.equals(configEnc)
- && (!pageDirEnc.startsWith("UTF-16") ||
!configEnc
- .startsWith("UTF-16"))) {
+ if (!pageDirEnc.equalsIgnoreCase(configEnc)
+ && (!pageDirEnc.startsWith("UTF-16") ||
!configEnc.startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.config_pagedir_encoding_mismatch",
configEnc, pageDirEnc);
@@ -356,9 +356,8 @@
*/
if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) ||
root.isBomPresent()) {
String pageEnc = root.getPageEncoding();
- if (!pageDirEnc.equals(pageEnc)
- && (!pageDirEnc.startsWith("UTF-16") ||
!pageEnc
- .startsWith("UTF-16"))) {
+ if (!pageDirEnc.equalsIgnoreCase(pageEnc)
+ && (!pageDirEnc.startsWith("UTF-16") ||
!pageEnc.startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.prolog_pagedir_encoding_mismatch",
pageEnc, pageDirEnc);
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-13 10:29:12 UTC (rev 614)
+++ trunk/webapps/docs/changelog.xml 2008-05-13 11:50:48 UTC (rev 615)
@@ -55,6 +55,9 @@
<fix>
<bug>44021</bug>: Add support to manger and deployer for wars and
dirs that use # to denote multi-level contexts. (markt)
</fix>
+ <fix>
+ <bug>42934</bug>: Trigger contextInitialized() before
sessionDidActivate(). (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -78,6 +81,12 @@
<fix>
<jboss-jira>JBCTS-776</jboss-jira>: NPE regression in EL type
handling. (remm)
</fix>
+ <fix>
+ <jboss-jira>JBAS-5518</jboss-jira>: Case insensitive comparison of
charsets. (remm)
+ </fix>
+ <fix>
+ <bug>42943</bug>: Make sure the nested element is inside a
<jsp:text> element. (markt)
+ </fix>
</changelog>
</subsection>
</section>
Show replies by date