Author: remy.maucherat(a)jboss.com
Date: 2009-01-02 11:29:58 -0500 (Fri, 02 Jan 2009)
New Revision: 892
Modified:
trunk/java/org/apache/jasper/compiler/Parser.java
trunk/java/org/apache/jasper/servlet/JasperLoader.java
trunk/webapps/docs/changelog.xml
Log:
- Two small Jasper fixes.
Modified: trunk/java/org/apache/jasper/compiler/Parser.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Parser.java 2009-01-02 16:29:08 UTC (rev 891)
+++ trunk/java/org/apache/jasper/compiler/Parser.java 2009-01-02 16:29:58 UTC (rev 892)
@@ -1312,7 +1312,7 @@
if (ch == '<') {
reader.pushChar();
break;
- } else if (ch == '$' || ch == '#') {
+ } else if ((ch == '$' || ch == '#') &&
!pageInfo.isELIgnored()) {
if (!reader.hasMoreInput()) {
ttext.write(ch);
break;
@@ -1332,11 +1332,8 @@
}
char next = (char) reader.peekChar();
// Looking for \% or \$ or \#
- // TODO: only recognize \$ or \# if isELIgnored is false, but since
- // it can be set in a page directive, it cannot be determined
- // here. Argh! (which is the way it should be since we shouldn't
- // convolude multiple steps at once and create confusing parsers...)
- if (next == '%' || next == '$' || next == '#') {
+ if (next == '%' || ((next == '$' || next == '#')
&&
+ !pageInfo.isELIgnored())) {
ch = reader.nextChar();
}
}
@@ -1455,9 +1452,9 @@
parseXMLScriptlet(parent);
} else if (reader.matches("<jsp:text")) {
parseXMLTemplateText(parent);
- } else if (reader.matches("${")) {
+ } else if (reader.matches("${") && !pageInfo.isELIgnored()) {
parseELExpression(parent, '$');
- } else if (reader.matches("#{")) {
+ } else if (reader.matches("#{") && !pageInfo.isELIgnored()) {
parseELExpression(parent, '#');
} else if (reader.matches("<jsp:")) {
parseStandardAction(parent);
Modified: trunk/java/org/apache/jasper/servlet/JasperLoader.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JasperLoader.java 2009-01-02 16:29:08 UTC (rev
891)
+++ trunk/java/org/apache/jasper/servlet/JasperLoader.java 2009-01-02 16:29:58 UTC (rev
892)
@@ -36,6 +36,7 @@
*/
public class JasperLoader extends URLClassLoader {
+ private static final String JSP_PACKAGE_PREFIX = Constants.JSP_PACKAGE_NAME +
".";
private PermissionCollection permissionCollection;
private CodeSource codeSource;
private String className;
@@ -122,7 +123,7 @@
}
}
- if( !name.startsWith(Constants.JSP_PACKAGE_NAME) ) {
+ if( !name.startsWith(JSP_PACKAGE_PREFIX) ) {
// Class is not in org.apache.jsp, therefore, have our
// parent load it
clazz = parent.loadClass(name);
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-02 16:29:08 UTC (rev 891)
+++ trunk/webapps/docs/changelog.xml 2009-01-02 16:29:58 UTC (rev 892)
@@ -86,6 +86,12 @@
<fix>
<bug>46261</bug>: Handling for / in context path. (markt)
</fix>
+ <fix>
+ Filter out negative ports on shutdown, so no connection attempt at all. (remm)
+ </fix>
+ <fix>
+ <bug>23066</bug>: Rare NPE when loading a class. Submitted by
Konstantin Kolinko. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -103,6 +109,12 @@
<fix>
EL security manager fixes. (markt)
</fix>
+ <fix>
+ <bug>36923</bug>: If EL is diabled, handle as template text. (markt)
+ </fix>
+ <fix>
+ <bug>46462</bug>: Compatibility with ASF projects which use JSP.
(markt)
+ </fix>
</changelog>
</subsection>
</section>
Show replies by date