JBossWeb SVN: r1224 - trunk/java/org/apache/jasper.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-10-27 11:20:39 -0400 (Tue, 27 Oct 2009)
New Revision: 1224
Modified:
trunk/java/org/apache/jasper/Constants.java
Log:
Fix for JBWEB-142.
Modified: trunk/java/org/apache/jasper/Constants.java
===================================================================
--- trunk/java/org/apache/jasper/Constants.java 2009-10-23 15:18:47 UTC (rev 1223)
+++ trunk/java/org/apache/jasper/Constants.java 2009-10-27 15:20:39 UTC (rev 1224)
@@ -89,7 +89,7 @@
/**
* Default size for the tag buffers.
*/
- public static final int DEFAULT_TAG_BUFFER_SIZE = 512;
+ public static final int DEFAULT_TAG_BUFFER_SIZE = Integer.parseInt(System.getProperty("org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE", "512"));
/**
* Default tag handler pool size.
15 years, 2 months
JBossWeb SVN: r1223 - trunk/java/javax/servlet.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-23 11:18:47 -0400 (Fri, 23 Oct 2009)
New Revision: 1223
Modified:
trunk/java/javax/servlet/SessionCookieConfig.java
Log:
- Javadoc update.
Modified: trunk/java/javax/servlet/SessionCookieConfig.java
===================================================================
--- trunk/java/javax/servlet/SessionCookieConfig.java 2009-10-22 15:16:50 UTC (rev 1222)
+++ trunk/java/javax/servlet/SessionCookieConfig.java 2009-10-23 15:18:47 UTC (rev 1223)
@@ -49,8 +49,9 @@
/**
* Sets the name that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* <p>NOTE: Changing the name of session tracking cookies may break
* other tiers (for example, a load balancing frontend) that assume
@@ -68,8 +69,9 @@
/**
* Gets the name that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* <p>By default, <tt>JSESSIONID</tt> will be used as the cookie name.
*
@@ -83,8 +85,9 @@
/**
* Sets the domain name that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @param domain the cookie domain to use
*
@@ -99,8 +102,9 @@
/**
* Gets the domain name that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @return the cookie domain set via {@link #setDomain}, or
* <tt>null</tt> if {@link #setDomain} was never called
@@ -112,8 +116,9 @@
/**
* Sets the path that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @param path the cookie path to use
*
@@ -128,8 +133,9 @@
/**
* Gets the path that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* <p>By default, the context path of the <tt>ServletContext</tt>
* from which this <tt>SessionCookieConfig</tt> was acquired will
@@ -145,9 +151,14 @@
/**
* Sets the comment that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
+ * <p>As a side effect of this call, the session tracking cookies
+ * will be marked with a <code>Version</code> attribute equal to
+ * <code>1</code>.
+ *
* @param comment the cookie comment to use
*
* @throws IllegalStateException if the <tt>ServletContext</tt>
@@ -155,14 +166,16 @@
* already been initialized
*
* @see javax.servlet.http.Cookie#setComment(String)
+ * @see javax.servlet.http.Cookie#getVersion
*/
public void setComment(String comment);
/**
* Gets the comment that will be assigned to any session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from
- * which this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @return the cookie comment set via {@link #setComment}, or
* <tt>null</tt> if {@link #setComment} was never called
@@ -174,8 +187,9 @@
/**
* Marks or unmarks the session tracking cookies created on behalf
- * of the <tt>ServletContext</tt> from which this
- * <tt>SessionCookieConfig</tt> was acquired as <i>HttpOnly</i>.
+ * of the application represented by the <tt>ServletContext</tt> from
+ * which this <tt>SessionCookieConfig</tt> was acquired as
+ * <i>HttpOnly</i>.
*
* <p>A cookie is marked as <tt>HttpOnly</tt> by adding the
* <tt>HttpOnly</tt> attribute to it. <i>HttpOnly</i> cookies are
@@ -184,9 +198,9 @@
* attacks.
*
* @param httpOnly true if the session tracking cookies created
- * on behalf of the <tt>ServletContext</tt> from which this
- * <tt>SessionCookieConfig</tt> was acquired shall be marked as
- * <i>HttpOnly</i>, false otherwise
+ * on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired shall be marked as <i>HttpOnly</i>, false otherwise
*
* @throws IllegalStateException if the <tt>ServletContext</tt>
* from which this <tt>SessionCookieConfig</tt> was acquired has
@@ -199,12 +213,14 @@
/**
* Checks if the session tracking cookies created on behalf of the
- * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
- * was acquired will be marked as <i>HttpOnly</i>.
+ * application represented by the <tt>ServletContext</tt> from which
+ * this <tt>SessionCookieConfig</tt> was acquired will be marked as
+ * <i>HttpOnly</i>.
*
- * @return true if the session tracking cookies created on behalf of the
- * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
- * was acquired will be marked as <i>HttpOnly</i>, false otherwise
+ * @return true if the session tracking cookies created on behalf of
+ * the application represented by the <tt>ServletContext</tt> from
+ * which this <tt>SessionCookieConfig</tt> was acquired will be marked
+ * as <i>HttpOnly</i>, false otherwise
*
* @see javax.servlet.http.Cookie#isHttpOnly()
*/
@@ -212,9 +228,9 @@
/**
- * Marks or unmarks the session tracking cookies created on behalf of the
- * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
- * was acquired as <i>secure</i>.
+ * Marks or unmarks the session tracking cookies created on behalf of
+ * the application represented by the <tt>ServletContext</tt> from which
+ * this <tt>SessionCookieConfig</tt> was acquired as <i>secure</i>.
*
* <p>One use case for marking a session tracking cookie as
* <tt>secure</tt>, even though the request that initiated the session
@@ -225,12 +241,12 @@
* and the web container will be over HTTP.
*
* @param secure true if the session tracking cookies created on
- * behalf of the <tt>ServletContext</tt> from which this
- * <tt>SessionCookieConfig</tt> was acquired shall be marked as
- * <i>secure</i> even if the request that initiated the corresponding
- * session is using plain HTTP instead of HTTPS, and false if they
- * shall be marked as <i>secure</i> only if the request that initiated
- * the corresponding session was also secure
+ * behalf of the application represented by the <tt>ServletContext</tt>
+ * from which this <tt>SessionCookieConfig</tt> was acquired shall be
+ * marked as <i>secure</i> even if the request that initiated the
+ * corresponding session is using plain HTTP instead of HTTPS, and false
+ * if they shall be marked as <i>secure</i> only if the request that
+ * initiated the corresponding session was also secure
*
* @throws IllegalStateException if the <tt>ServletContext</tt>
* from which this <tt>SessionCookieConfig</tt> was acquired has
@@ -244,18 +260,18 @@
/**
* Checks if the session tracking cookies created on behalf of the
- * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
- * was acquired will be marked as <i>secure</i> even if the request
- * that initiated the corresponding session is using plain HTTP
- * instead of HTTPS.
+ * application represented by the <tt>ServletContext</tt> from which
+ * this <tt>SessionCookieConfig</tt> was acquired will be marked as
+ * <i>secure</i> even if the request that initiated the corresponding
+ * session is using plain HTTP instead of HTTPS.
*
* @return true if the session tracking cookies created on behalf of the
- * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
- * was acquired will be marked as <i>secure</i> even if the request
- * that initiated the corresponding session is using plain HTTP
- * instead of HTTPS, and false if they will be marked as <i>secure</i>
- * only if the request that initiated the corresponding session was
- * also secure
+ * application represented by the <tt>ServletContext</tt> from which
+ * this <tt>SessionCookieConfig</tt> was acquired will be marked as
+ * <i>secure</i> even if the request that initiated the corresponding
+ * session is using plain HTTP instead of HTTPS, and false if they will
+ * be marked as <i>secure</i> only if the request that initiated the
+ * corresponding session was also secure
*
* @see javax.servlet.http.Cookie#getSecure()
* @see ServletRequest#isSecure()
@@ -265,12 +281,14 @@
/**
* Sets the lifetime (in seconds) for the session tracking cookies
- * created on behalf of the <tt>ServletContext</tt> from which this
- * <tt>SessionCookieConfig</tt> was acquired.
+ * created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @param maxAge the lifetime (in seconds) of the session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from which
- * this <tt>SessionCookieConfig</tt> was acquired.
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* @throws IllegalStateException if the <tt>ServletContext</tt>
* from which this <tt>SessionCookieConfig</tt> was acquired has
@@ -283,15 +301,16 @@
/**
* Gets the lifetime (in seconds) of the session tracking cookies
- * created on behalf of the <tt>ServletContext</tt> from which this
- * <tt>SessionCookieConfig</tt> was acquired.
+ * created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired.
*
* <p>By default, <tt>-1</tt> is returned.
*
* @return the lifetime (in seconds) of the session tracking
- * cookies created on behalf of the <tt>ServletContext</tt> from which
- * this <tt>SessionCookieConfig</tt> was acquired, or <tt>-1</tt> (the
- * default)
+ * cookies created on behalf of the application represented by the
+ * <tt>ServletContext</tt> from which this <tt>SessionCookieConfig</tt>
+ * was acquired, or <tt>-1</tt> (the default)
*
* @see javax.servlet.http.Cookie#getMaxAge
*/
15 years, 2 months
JBossWeb SVN: r1222 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-22 11:16:50 -0400 (Thu, 22 Oct 2009)
New Revision: 1222
Added:
tags/JBOSSWEB_3_0_0_ALPHA12/
Log:
- JSP metadata API change.
Copied: tags/JBOSSWEB_3_0_0_ALPHA12 (from rev 1221, trunk)
15 years, 2 months
JBossWeb SVN: r1221 - in trunk/java/org/apache: jasper/compiler and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-22 11:14:14 -0400 (Thu, 22 Oct 2009)
New Revision: 1221
Added:
trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
Modified:
trunk/java/org/apache/jasper/compiler/Parser.java
Log:
- Port fix for 48019. Be more careful to skip over all of nodes we aren't interested it.
- Add a listener to prevent leaks by preinitializing singletons.
Added: trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (rev 0)
+++ trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 2009-10-22 15:14:14 UTC (rev 1221)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.core;
+
+import javax.imageio.ImageIO;
+
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+
+/**
+ * Provide a workaround for known places where the Java Runtime environment uses
+ * the context class loader to load a singleton as this will cause a memory leak
+ * if a web application class loader happens to be the context class loader at
+ * the time. The work-around is to initialise these singletons when Tomcat's
+ * common class loader is the context class loader.
+ */
+public class JreMemoryLeakPreventionListener implements LifecycleListener {
+
+ @Override
+ public void lifecycleEvent(LifecycleEvent event) {
+ // Initialise these classes when Tomcat starts
+ if (Lifecycle.INIT_EVENT.equals(event.getType())) {
+ /*
+ * Several components end up calling:
+ * sun.awt.AppContext.getAppContext()
+ *
+ * Those libraries / components known to trigger memory leaks due to
+ * eventual calls to getAppContext() are:
+ *
+ * - Google Web Toolkit via its use of javax.imageio
+ * - Tomcat via its use of java.beans.Introspector.flushCaches() in
+ * 1.6.0_15 onwards
+ * - others TBD
+ */
+
+ // Trigger a call to sun.awt.AppContext.getAppContext(). This will
+ // pin the common class loader in memory but that shouldn't be an
+ // issue.
+ ImageIO.getCacheDirectory();
+
+ }
+ }
+
+}
Modified: trunk/java/org/apache/jasper/compiler/Parser.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Parser.java 2009-10-22 14:40:46 UTC (rev 1220)
+++ trunk/java/org/apache/jasper/compiler/Parser.java 2009-10-22 15:14:14 UTC (rev 1221)
@@ -1777,11 +1777,21 @@
while (reader.hasMoreInput()) {
start = reader.mark();
if (reader.matches("%--")) {
- parseComment(parent);
+ // Comment
+ reader.skipUntil("--%>");
} else if (reader.matches("%@")) {
parseDirective(parent);
} else if (reader.matches("jsp:directive.")) {
parseXMLDirective(parent);
+ } else if (reader.matches("%!")) {
+ // Declaration
+ reader.skipUntil("%>");
+ } else if (reader.matches("%=")) {
+ // Expression
+ reader.skipUntil("%>");
+ } else if (reader.matches("%")) {
+ // Scriptlet
+ reader.skipUntil("%>");
}
reader.skipUntil("<");
}
15 years, 2 months
JBossWeb SVN: r1220 - in trunk/java/org/apache: jasper/compiler and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-22 10:40:46 -0400 (Thu, 22 Oct 2009)
New Revision: 1220
Modified:
trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- Move remaining stuff over to booleans.
Modified: trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java 2009-10-22 12:05:13 UTC (rev 1219)
+++ trunk/java/org/apache/catalina/deploy/jsp/TagInfo.java 2009-10-22 14:40:46 UTC (rev 1220)
@@ -43,7 +43,7 @@
/*
* Additional private fields for 2.0 info
*/
- protected boolean dynamicAttributes;
+ protected String dynamicAttributes;
public void addTagAttributeInfo(TagAttributeInfo tagAttributeInfo) {
tagAttributeInfos.add(tagAttributeInfo);
@@ -125,11 +125,11 @@
this.largeIcon = largeIcon;
}
- public boolean isDynamicAttributes() {
+ public String getDynamicAttributes() {
return dynamicAttributes;
}
- public void setDynamicAttributes(boolean dynamicAttributes) {
+ public void setDynamicAttributes(String dynamicAttributes) {
this.dynamicAttributes = dynamicAttributes;
}
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-22 12:05:13 UTC (rev 1219)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-22 14:40:46 UTC (rev 1220)
@@ -276,6 +276,8 @@
ArrayList<TagAttributeInfo> attributeInfos = new ArrayList<TagAttributeInfo>();
ArrayList<TagVariableInfo> variableInfos = new ArrayList<TagVariableInfo>();
+ boolean dynamicAttributes = JspUtil.booleanValue(tagInfo.getDynamicAttributes());
+
org.apache.catalina.deploy.jsp.TagAttributeInfo attributeInfosArray[] = tagInfo.getTagAttributeInfos();
for (int i = 0; i < attributeInfosArray.length; i++) {
TagAttributeInfo attributeInfo = createTagAttributeInfo(attributeInfosArray[i]);
@@ -299,11 +301,11 @@
e);
}
}
-
+
return new TagInfo(tagInfo.getTagName(), tagInfo.getTagClassName(), tagInfo.getBodyContent(),
tagInfo.getInfoString(), this, tei, attributeInfos.toArray(new TagAttributeInfo[0]),
tagInfo.getDisplayName(), tagInfo.getSmallIcon(), tagInfo.getLargeIcon(),
- variableInfos.toArray(new TagVariableInfo[0]), tagInfo.isDynamicAttributes());
+ variableInfos.toArray(new TagVariableInfo[0]), dynamicAttributes);
}
protected TagAttributeInfo createTagAttributeInfo(org.apache.catalina.deploy.jsp.TagAttributeInfo attributeInfo) {
15 years, 2 months
JBossWeb SVN: r1219 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-22 08:05:13 -0400 (Thu, 22 Oct 2009)
New Revision: 1219
Modified:
trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- Fix JAR URLs.
Modified: trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-10-21 21:03:01 UTC (rev 1218)
+++ trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-10-22 12:05:13 UTC (rev 1219)
@@ -569,10 +569,10 @@
URL tagFileJarUrl = null;
if (tagFilePath.startsWith("/META-INF/")) {
- try {
- tagFileJarUrl = new URL("jar:" +
- compiler.getCompilationContext().getTldLocation(
- tagInfo.getTagLibrary().getURI())[0] + "!/");
+ try {
+ String[] location = compiler.getCompilationContext().getTldLocation(tagInfo.getTagLibrary().getURI());
+ URL jarUrl = compiler.getCompilationContext().getServletContext().getResource(location[0]);
+ tagFileJarUrl = new URL("jar:" + jarUrl + "!/");
} catch (MalformedURLException e) {
// Ignore ...
}
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 21:03:01 UTC (rev 1218)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-22 12:05:13 UTC (rev 1219)
@@ -161,7 +161,10 @@
}
if (location[0] != null && location[0].endsWith(".jar")) {
try {
- jarFileUrl = new URL("jar:file:" + location[0] + "!/");
+ URL jarUrl = ctxt.getServletContext().getResource(location[0]);
+ if (jarUrl != null) {
+ jarFileUrl = new URL("jar:" + jarUrl + "!/");
+ }
} catch (MalformedURLException ex) {
err.jspError("jsp.error.file.not.found", uriIn);
}
15 years, 2 months
JBossWeb SVN: r1218 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-21 17:03:01 -0400 (Wed, 21 Oct 2009)
New Revision: 1218
Added:
tags/JBOSSWEB_3_0_0_ALPHA11/
Log:
- JSP fixes.
Copied: tags/JBOSSWEB_3_0_0_ALPHA11 (from rev 1217, trunk)
15 years, 2 months
JBossWeb SVN: r1217 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-21 16:41:51 -0400 (Wed, 21 Oct 2009)
New Revision: 1217
Modified:
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- Fix boolean flag.
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 18:09:41 UTC (rev 1216)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 20:41:51 UTC (rev 1217)
@@ -310,8 +310,8 @@
String methodSignature = attributeInfo.getMethodSignature();
boolean rtexprvalue = JspUtil.booleanValue(attributeInfo.getReqTime());
boolean fragment = JspUtil.booleanValue(attributeInfo.getFragment());
- boolean deferredValue = attributeInfo.getDeferredValue() != null;
- boolean deferredMethod = attributeInfo.getDeferredMethod() != null;
+ boolean deferredValue = JspUtil.booleanValue(attributeInfo.getDeferredValue());
+ boolean deferredMethod = JspUtil.booleanValue(attributeInfo.getDeferredMethod());
boolean required = JspUtil.booleanValue(attributeInfo.getRequired());
if (type != null) {
15 years, 2 months
JBossWeb SVN: r1216 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-21 14:09:41 -0400 (Wed, 21 Oct 2009)
New Revision: 1216
Modified:
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- Two taglib "parsing" bugs.
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 16:38:38 UTC (rev 1215)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 18:09:41 UTC (rev 1216)
@@ -384,12 +384,12 @@
}
}
String className = variableInfo.getClassName();
- if (className != null) {
+ if (className == null) {
className = "java.lang.String";
}
boolean declare = true;
if (variableInfo.getDeclare() != null) {
- declare = JspUtil.booleanValue(s);
+ declare = JspUtil.booleanValue(variableInfo.getDeclare());
}
return new TagVariableInfo(variableInfo.getNameGiven(), variableInfo.getNameFromAttribute(),
className, declare, scope);
15 years, 2 months
JBossWeb SVN: r1215 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-10-21 12:38:38 -0400 (Wed, 21 Oct 2009)
New Revision: 1215
Modified:
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- The old code used normalize underneath.
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 15:59:16 UTC (rev 1214)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 16:38:38 UTC (rev 1215)
@@ -68,6 +68,7 @@
import javax.servlet.jsp.tagext.VariableInfo;
import org.apache.catalina.Globals;
+import org.apache.catalina.util.RequestUtil;
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
import org.jboss.logging.Logger;
@@ -169,6 +170,9 @@
org.apache.catalina.deploy.jsp.TagLibraryInfo tagLibraryInfo =
((HashMap<String, org.apache.catalina.deploy.jsp.TagLibraryInfo>)
ctxt.getServletContext().getAttribute(Globals.JSP_TAG_LIBRARIES)).get(uri);
+ if (tagLibraryInfo == null) {
+ err.jspError("jsp.error.file.not.found", uriIn);
+ }
ArrayList<TagInfo> tagInfos = new ArrayList<TagInfo>();
ArrayList<TagFileInfo> tagFileInfos = new ArrayList<TagFileInfo>();
@@ -233,6 +237,9 @@
uri);
} else if (uriType == NOROOT_REL_URI) {
uri = ctxt.resolveRelativeUri(uri);
+ if (uri != null) {
+ uri = RequestUtil.normalize(uri);
+ }
}
String[] location = new String[2];
15 years, 2 months