JBossWeb SVN: r896 - in trunk: java/org/apache/jasper/compiler and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-07 10:37:49 -0500 (Wed, 07 Jan 2009)
New Revision: 896
Modified:
trunk/PATCHES.txt
trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
trunk/java/org/apache/jasper/compiler/JspUtil.java
trunk/java/org/apache/jasper/compiler/ParserController.java
trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
trunk/webapps/docs/changelog.xml
Log:
- Use a jar url in a tag id.
Modified: trunk/PATCHES.txt
===================================================================
--- trunk/PATCHES.txt 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/PATCHES.txt 2009-01-07 15:37:49 UTC (rev 896)
@@ -37,3 +37,6 @@
728947
Lame IE 6 and 7 cookie hack for expires.
+
+various
+New JDBC pool module
Modified: trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java 2009-01-07 15:37:49 UTC (rev 896)
@@ -194,6 +194,7 @@
tagInfo = TagFileProcessor.parseTagFileDirectives(pc,
shortName,
path,
+ pc.getJspCompilationContext().getTagFileJarUrl(path),
this);
} catch (JasperException je) {
throw new RuntimeException(je.toString(), je);
Modified: trunk/java/org/apache/jasper/compiler/JspUtil.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspUtil.java 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/java/org/apache/jasper/compiler/JspUtil.java 2009-01-07 15:37:49 UTC (rev 896)
@@ -835,16 +835,38 @@
/**
* Gets the fully-qualified class name of the tag handler corresponding to
* the given tag file path.
- *
- * @param path Tag file path
- * @param err Error dispatcher
- *
- * @return Fully-qualified class name of the tag handler corresponding to
- * the given tag file path
+ *
+ * @param path
+ * Tag file path
+ * @param err
+ * Error dispatcher
+ *
+ * @return Fully-qualified class name of the tag handler corresponding to
+ * the given tag file path
+ *
+ * @deprecated Use {@link #getTagHandlerClassName(String, String,
+ * ErrorDispatcher)
+ * See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
*/
- public static String getTagHandlerClassName(String path,
- ErrorDispatcher err)
- throws JasperException {
+ public static String getTagHandlerClassName(String path, ErrorDispatcher err)
+ throws JasperException {
+ return getTagHandlerClassName(path, null, err);
+ }
+
+ /**
+ * Gets the fully-qualified class name of the tag handler corresponding to
+ * the given tag file path.
+ *
+ * @param path
+ * Tag file path
+ * @param err
+ * Error dispatcher
+ *
+ * @return Fully-qualified class name of the tag handler corresponding to
+ * the given tag file path
+ */
+ public static String getTagHandlerClassName(String path, String urn,
+ ErrorDispatcher err) throws JasperException {
String className = null;
int begin = 0;
@@ -872,7 +894,7 @@
} else {
index = path.indexOf(META_INF_TAGS);
if (index != -1) {
- className = "org.apache.jsp.tag.meta.";
+ className = getClassNameBase(urn);
begin = index + META_INF_TAGS.length();
} else {
err.jspError("jsp.error.tagfile.illegalPath", path);
@@ -884,6 +906,15 @@
return className;
}
+ private static String getClassNameBase(String urn) {
+ StringBuffer base = new StringBuffer("org.apache.jsp.tag.meta.");
+ if (urn != null) {
+ base.append(makeJavaPackage(urn));
+ base.append('.');
+ }
+ return base.toString();
+ }
+
/**
* Converts the given path to a Java package or fully-qualified class name
*
Modified: trunk/java/org/apache/jasper/compiler/ParserController.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/ParserController.java 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/java/org/apache/jasper/compiler/ParserController.java 2009-01-07 15:37:49 UTC (rev 896)
@@ -143,20 +143,37 @@
* This is invoked by the compiler
*
* @param inFileName The name of the tag file to be parsed.
+ * @deprecated Use {@link #parseTagFileDirectives(String, URL)}
+ * See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
*/
public Node.Nodes parseTagFileDirectives(String inFileName)
throws FileNotFoundException, JasperException, IOException {
+ return parseTagFileDirectives(
+ inFileName, ctxt.getTagFileJarUrl(inFileName));
+ }
+
+ /**
+ * Extracts tag file directive information from the given tag file.
+ *
+ * This is invoked by the compiler
+ *
+ * @param inFileName The name of the tag file to be parsed.
+ * @param tagFileJarUrl The location of the tag file.
+ */
+ public Node.Nodes parseTagFileDirectives(String inFileName,
+ URL tagFileJarUrl)
+ throws FileNotFoundException, JasperException, IOException {
boolean isTagFileSave = isTagFile;
boolean directiveOnlySave = directiveOnly;
isTagFile = true;
directiveOnly = true;
- Node.Nodes page = doParse(inFileName, null,
- ctxt.getTagFileJarUrl(inFileName));
+ Node.Nodes page = doParse(inFileName, null, tagFileJarUrl);
directiveOnly = directiveOnlySave;
isTagFile = isTagFileSave;
return page;
}
+
/**
* Parses the JSP page or tag file with the given path name.
*
Modified: trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-01-07 15:37:49 UTC (rev 896)
@@ -19,11 +19,13 @@
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.net.URLClassLoader;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import java.util.HashMap;
import javax.el.MethodExpression;
import javax.el.ValueExpression;
@@ -37,8 +39,8 @@
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
+import org.apache.jasper.runtime.JspSourceDependent;
import org.apache.jasper.servlet.JspServletWrapper;
-import org.apache.jasper.runtime.JspSourceDependent;
/**
* 1. Processes and extracts the directive info in a tag file. 2. Compiles and
@@ -379,7 +381,8 @@
bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
}
- String tagClassName = JspUtil.getTagHandlerClassName(path, err);
+ String tagClassName = JspUtil.getTagHandlerClassName(
+ path, tagLibInfo.getReliableURN(), err);
TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector
.size()];
@@ -502,16 +505,47 @@
* @param tagLibInfo
* the TagLibraryInfo object associated with this TagInfo
* @return a TagInfo object assembled from the directives in the tag file.
+ * @deprecated Use {@link TagFileProcessor#parseTagFileDirectives(
+ * ParserController, String, String, URL, TagLibraryInfo)}
+ * See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
*/
public static TagInfo parseTagFileDirectives(ParserController pc,
String name, String path, TagLibraryInfo tagLibInfo)
throws JasperException {
+ return parseTagFileDirectives(pc, name, path,
+ pc.getJspCompilationContext().getTagFileJarUrl(path),
+ tagLibInfo);
+ }
+
+ /**
+ * Parses the tag file, and collects information on the directives included
+ * in it. The method is used to obtain the info on the tag file, when the
+ * handler that it represents is referenced. The tag file is not compiled
+ * here.
+ *
+ * @param pc
+ * the current ParserController used in this compilation
+ * @param name
+ * the tag name as specified in the TLD
+ * @param tagfile
+ * the path for the tagfile
+ * @param tagFileJarUrl
+ * the url for the Jar containign the tag file
+ * @param tagLibInfo
+ * the TagLibraryInfo object associated with this TagInfo
+ * @return a TagInfo object assembled from the directives in the tag file.
+ */
+ public static TagInfo parseTagFileDirectives(ParserController pc,
+ String name, String path, URL tagFileJarUrl, TagLibraryInfo tagLibInfo)
+ throws JasperException {
+
+
ErrorDispatcher err = pc.getCompiler().getErrorDispatcher();
Node.Nodes page = null;
try {
- page = pc.parseTagFileDirectives(path);
+ page = pc.parseTagFileDirectives(path, tagFileJarUrl);
} catch (FileNotFoundException e) {
err.jspError("jsp.error.file.not.found", path);
} catch (IOException e) {
@@ -526,26 +560,44 @@
return tagFileVisitor.getTagInfo();
}
+
/**
* Compiles and loads a tagfile.
*/
private Class loadTagFile(Compiler compiler, String tagFilePath,
TagInfo tagInfo, PageInfo parentPageInfo) throws JasperException {
+ URL tagFileJarUrl = null;
+ if (tagFilePath.startsWith("/META-INF/")) {
+ try {
+ tagFileJarUrl = new URL("jar:" +
+ compiler.getCompilationContext().getTldLocation(
+ tagInfo.getTagLibrary().getURI())[0] + "!/");
+ } catch (MalformedURLException e) {
+ // Ignore ...
+ }
+ }
+ String tagFileJarPath;
+ if (tagFileJarUrl == null) {
+ tagFileJarPath = "";
+ } else {
+ tagFileJarPath = tagFileJarUrl.toString();
+ }
+
JspCompilationContext ctxt = compiler.getCompilationContext();
JspRuntimeContext rctxt = ctxt.getRuntimeContext();
- JspServletWrapper wrapper = (JspServletWrapper) rctxt
- .getWrapper(tagFilePath);
+ JspServletWrapper wrapper = rctxt.getWrapper(tagFileJarPath + tagFilePath);
synchronized (rctxt) {
if (wrapper == null) {
wrapper = new JspServletWrapper(ctxt.getServletContext(), ctxt
.getOptions(), tagFilePath, tagInfo, ctxt
- .getRuntimeContext(), ctxt.getTagFileJarUrl(tagFilePath));
- rctxt.addWrapper(tagFilePath, wrapper);
+ .getRuntimeContext(), tagFileJarUrl);
+ rctxt.addWrapper(tagFileJarPath + tagFilePath, wrapper);
// Use same classloader and classpath for compiling tag files
- wrapper.getJspEngineContext().setClassLoader(ctxt.getClassLoader());
+ wrapper.getJspEngineContext().setClassLoader(
+ (URLClassLoader) ctxt.getClassLoader());
wrapper.getJspEngineContext().setClassPath(ctxt.getClassPath());
} else {
// Make sure that JspCompilationContext gets the latest TagInfo
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-01-07 15:37:49 UTC (rev 896)
@@ -471,13 +471,16 @@
if (path.startsWith("/META-INF/tags")) {
// Tag file packaged in JAR
+ // See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
+ // This needs to be removed once all the broken code that depends on
+ // it has been removed
ctxt.setTagFileJarUrl(path, jarFileUrl);
} else if (!path.startsWith("/WEB-INF/tags")) {
err.jspError("jsp.error.tagfile.illegalPath", path);
}
TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(
- parserController, name, path, this);
+ parserController, name, path, jarFileUrl, this);
return new TagFileInfo(name, path, tagInfo);
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-06 16:31:23 UTC (rev 895)
+++ trunk/webapps/docs/changelog.xml 2009-01-07 15:37:49 UTC (rev 896)
@@ -75,7 +75,8 @@
Support all cookie flags in RewriteRule. (remm)
</update>
<fix>
- Remove useless normalization when getting a request dispatcher through a request. (remm)
+ Remove useless normalization when getting a request dispatcher through a request, and
+ refactor normalization to use the implementation in RequestUtil. (remm, markt)
</fix>
<fix>
Filter not found URI in default servlet. (remm)
@@ -121,6 +122,10 @@
<fix>
<bug>37515</bug>: Add options for 1.6 and 1.7 source and target to JDT compiler. (markt)
</fix>
+ <fix>
+ <bug>46471</bug>: Use jar url and tag file path to uniquely ID a tag file to prevent naming
+ clashes. (markt)
+ </fix>
</changelog>
</subsection>
</section>
15 years, 12 months
JBossWeb SVN: r895 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-06 11:31:23 -0500 (Tue, 06 Jan 2009)
New Revision: 895
Modified:
trunk/java/org/apache/catalina/manager/LocalStrings.properties
trunk/java/org/apache/catalina/manager/ManagerServlet.java
trunk/webapps/docs/changelog.xml
Log:
- New error message in the manager servlet.
Modified: trunk/java/org/apache/catalina/manager/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/catalina/manager/LocalStrings.properties 2009-01-06 16:27:33 UTC (rev 894)
+++ trunk/java/org/apache/catalina/manager/LocalStrings.properties 2009-01-06 16:31:23 UTC (rev 895)
@@ -45,6 +45,7 @@
managerServlet.cannotInvoke=Cannot invoke manager servlet through invoker
managerServlet.configured=OK - Deployed application from context file {0}
managerServlet.deployed=OK - Deployed application at context path {0}
+managerServlet.deployedButNotStarted=FAIL - Deployed application at context path {0} but context failed to start
managerServlet.deployFailed=FAIL - Failed to deploy application at context path {0}
managerServlet.exception=FAIL - Encountered exception {0}
managerServlet.deployed=OK - Deployed application at context path {0}
Modified: trunk/java/org/apache/catalina/manager/ManagerServlet.java
===================================================================
--- trunk/java/org/apache/catalina/manager/ManagerServlet.java 2009-01-06 16:27:33 UTC (rev 894)
+++ trunk/java/org/apache/catalina/manager/ManagerServlet.java 2009-01-06 16:31:23 UTC (rev 895)
@@ -819,8 +819,10 @@
}
}
context = (Context) host.findChild(path);
- if (context != null && context.getConfigured()) {
+ if (context != null && context.getConfigured() && context.getAvailable()) {
writer.println(sm.getString("managerServlet.deployed", displayPath));
+ } else if (context!=null && !context.getAvailable()) {
+ writer.println(sm.getString("managerServlet.deployedButNotStarted", displayPath));
} else {
// Something failed
writer.println(sm.getString("managerServlet.deployFailed", displayPath));
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-06 16:27:33 UTC (rev 894)
+++ trunk/webapps/docs/changelog.xml 2009-01-06 16:31:23 UTC (rev 895)
@@ -199,6 +199,9 @@
<fix>
Remove verbose attribute value logging during session passivation. (remm)
</fix>
+ <fix>
+ Specific error message for webapps that fail to start. (fhanik)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
15 years, 12 months
JBossWeb SVN: r894 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-06 11:27:33 -0500 (Tue, 06 Jan 2009)
New Revision: 894
Modified:
trunk/java/org/apache/jasper/compiler/JDTCompiler.java
trunk/webapps/docs/changelog.xml
Log:
- JDK options for the JDT compiler.
Modified: trunk/java/org/apache/jasper/compiler/JDTCompiler.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JDTCompiler.java 2009-01-02 16:35:04 UTC (rev 893)
+++ trunk/java/org/apache/jasper/compiler/JDTCompiler.java 2009-01-06 16:27:33 UTC (rev 894)
@@ -300,6 +300,12 @@
} else if(opt.equals("1.5")) {
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
+ } else if(opt.equals("1.6")) {
+ settings.put(CompilerOptions.OPTION_Source,
+ CompilerOptions.VERSION_1_6);
+ } else if(opt.equals("1.7")) {
+ settings.put(CompilerOptions.OPTION_Source,
+ CompilerOptions.VERSION_1_7);
} else {
log.warn("Unknown source VM " + opt + " ignored.");
settings.put(CompilerOptions.OPTION_Source,
@@ -331,6 +337,16 @@
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
+ } else if(opt.equals("1.6")) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
+ CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
+ CompilerOptions.VERSION_1_6);
+ } else if(opt.equals("1.7")) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
+ CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
+ CompilerOptions.VERSION_1_7);
} else {
log.warn("Unknown target VM " + opt + " ignored.");
settings.put(CompilerOptions.OPTION_TargetPlatform,
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-02 16:35:04 UTC (rev 893)
+++ trunk/webapps/docs/changelog.xml 2009-01-06 16:27:33 UTC (rev 894)
@@ -110,7 +110,7 @@
EL security manager fixes. (markt)
</fix>
<fix>
- <bug>36923</bug>: If EL is diabled, handle as template text. (markt)
+ <bug>36923</bug>: If EL is disabled, handle as template text. (markt)
</fix>
<fix>
<bug>46462</bug>: Compatibility with ASF projects which use JSP. (markt)
@@ -118,6 +118,9 @@
<fix>
<bug>46381</bug>: Coerce EL to String rather than Object when concatenating. (markt)
</fix>
+ <fix>
+ <bug>37515</bug>: Add options for 1.6 and 1.7 source and target to JDT compiler. (markt)
+ </fix>
</changelog>
</subsection>
</section>
15 years, 12 months
JBossWeb SVN: r893 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-02 11:35:04 -0500 (Fri, 02 Jan 2009)
New Revision: 893
Modified:
trunk/java/org/apache/jasper/compiler/Generator.java
trunk/webapps/docs/changelog.xml
Log:
- Ok, so I don't know why, but I can feel TCK trouble.
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-02 16:29:58 UTC (rev 892)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-02 16:35:04 UTC (rev 893)
@@ -834,6 +834,7 @@
private String attributeValueWithEL(boolean isTag, String tx,
Class<?> expectedType, String mapName) {
if (tx==null) return null;
+ Class<?> type = expectedType;
int size = tx.length();
StringBuffer output = new StringBuffer(size);
boolean el = false;
@@ -849,6 +850,8 @@
if (mark < i) {
if (output.length() > 0) {
output.append(" + ");
+ // Composite expression - must coerce to String
+ type = String.class;
}
output.append(quote(tx.substring(mark, i)));
}
@@ -863,10 +866,12 @@
// End of an EL expression
if (output.length() > 0) {
output.append(" + ");
+ // Composite expression - must coerce to String
+ type = String.class;
}
output.append(
JspUtil.interpreterCall(isTag,
- tx.substring(mark, i+1), expectedType,
+ tx.substring(mark, i+1), type,
mapName, false));
mark = i + 1;
el = false;
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-02 16:29:58 UTC (rev 892)
+++ trunk/webapps/docs/changelog.xml 2009-01-02 16:35:04 UTC (rev 893)
@@ -115,6 +115,9 @@
<fix>
<bug>46462</bug>: Compatibility with ASF projects which use JSP. (markt)
</fix>
+ <fix>
+ <bug>46381</bug>: Coerce EL to String rather than Object when concatenating. (markt)
+ </fix>
</changelog>
</subsection>
</section>
16 years
JBossWeb SVN: r892 - in trunk: java/org/apache/jasper/servlet and 1 other directories.
by jbossweb-commits@lists.jboss.org
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>
16 years
JBossWeb SVN: r891 - trunk/java/org/apache/catalina/loader.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-02 11:29:08 -0500 (Fri, 02 Jan 2009)
New Revision: 891
Modified:
trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Log:
- Very rare NPE.
Modified: trunk/java/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2009-01-02 16:28:56 UTC (rev 890)
+++ trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2009-01-02 16:29:08 UTC (rev 891)
@@ -1768,7 +1768,11 @@
return clazz;
synchronized (this) {
- if (entry.binaryContent == null && entry.loadedClass == null)
+ clazz = entry.loadedClass;
+ if (clazz != null)
+ return clazz;
+
+ if (entry.binaryContent == null)
throw new ClassNotFoundException(name);
// Looking up the package
@@ -1817,19 +1821,15 @@
}
- if (entry.loadedClass == null) {
- clazz = defineClass(name, entry.binaryContent, 0,
- entry.binaryContent.length,
- new CodeSource(entry.codeBase, entry.certificates));
- entry.loadedClass = clazz;
- entry.binaryContent = null;
- entry.source = null;
- entry.codeBase = null;
- entry.manifest = null;
- entry.certificates = null;
- } else {
- clazz = entry.loadedClass;
- }
+ clazz = defineClass(name, entry.binaryContent, 0,
+ entry.binaryContent.length,
+ new CodeSource(entry.codeBase, entry.certificates));
+ entry.loadedClass = clazz;
+ entry.binaryContent = null;
+ entry.source = null;
+ entry.codeBase = null;
+ entry.manifest = null;
+ entry.certificates = null;
}
return clazz;
16 years
JBossWeb SVN: r890 - trunk/bin.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-02 11:28:56 -0500 (Fri, 02 Jan 2009)
New Revision: 890
Modified:
trunk/bin/setclasspath.bat
Log:
- Sync setclasspath.
Modified: trunk/bin/setclasspath.bat
===================================================================
--- trunk/bin/setclasspath.bat 2009-01-02 16:05:41 UTC (rev 889)
+++ trunk/bin/setclasspath.bat 2009-01-02 16:28:56 UTC (rev 890)
@@ -1,3 +1,19 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
rem ---------------------------------------------------------------------------
rem Set CLASSPATH and Java options
rem
@@ -45,13 +61,16 @@
goto exit
:okBasedir
+rem Don't override the endorsed dir if the user has set it previously
+if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
rem Set the default -Djava.endorsed.dirs argument
set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
+:gotEndorseddir
rem Set standard CLASSPATH
rem Note that there are no quotes as we do not want to introduce random
rem quotes into the CLASSPATH
-if not exist "%JAVA_HOME%\bin\tools.jar" goto noJavac
+if not exist "%JAVA_HOME%\lib\tools.jar" goto noJavac
set CLASSPATH=%JAVA_HOME%\lib\tools.jar
:noJavac
16 years
JBossWeb SVN: r889 - trunk/java/org/apache/catalina/startup.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-02 11:05:41 -0500 (Fri, 02 Jan 2009)
New Revision: 889
Modified:
trunk/java/org/apache/catalina/startup/Catalina.java
Log:
- Filter out negative port numbers.
Modified: trunk/java/org/apache/catalina/startup/Catalina.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Catalina.java 2008-12-29 11:43:18 UTC (rev 888)
+++ trunk/java/org/apache/catalina/startup/Catalina.java 2009-01-02 16:05:41 UTC (rev 889)
@@ -411,6 +411,9 @@
}
// Stop the existing server
+ if (server.getPort() < 0) {
+ return;
+ }
try {
Socket socket = new Socket(server.getAddress(), server.getPort());
OutputStream stream = socket.getOutputStream();
16 years