[Bug 55798] Enabling Manager App - process and description is inadequate
https://issues.apache.org/bugzilla/show_bug.cgi?id=55798 --- Comment #3 from Konstantin Kolinko --- (In reply to BJ Chippindale from comment #1) > > 1. In server.xml the > >type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > - had to be changed to - > >type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > > pathname="/usr/local/apache-tomcat-7.0.47/conf/tomcat-users.xml" /> > There is no need for such a change. When the value of the pathname attribute is a relative path, it is interpreted as relative to ${catalina.base}. The code is in org.apache.catalina.users.MemoryUserDatabase#open(). I am keeping this issue open, as I think the open() method may be improved to log a message when the file is missing. It may be a warning if(this.readonly==true) and an info message otherwise. Currently it just returns silently. > > A wide range of useless information is out there on the web now, http://tomcat.apache.org/findhelp.html http://tomcat.apache.org/lists.html#tomcat-users > If root it may not behave... but as an ordinary user it did not start. > A tip in advance: Do not forget to apply "chown" to all log and temporary files that were created when you started Tomcat as root. Those are in $CATALINA_BASE/logs and $CATALINA_BASE/work. If those are not accessible, things will go wrong. And if log files are not writable, you will get no logging. If you have further questions, ask on the mailing list. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55797] Tomcat 7.0.47 crashes using server jvm.dll and APR at ntdll!ZwGetContextThread+0xa
https://issues.apache.org/bugzilla/show_bug.cgi?id=55797 Konstantin Kolinko changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #2 from Konstantin Kolinko --- There is not enough information in your report to diagnose the issue. There is no Tomcat code amongst the only two lines of a stacktrace that you are citing. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Standard Taglib 1.2.1
On Nov 16, 2013, at 8:29 AM, Jeremy Boynes wrote: > On Nov 13, 2013, at 6:58 PM, Jeremy Boynes wrote: > > Nudge - please could a couple of PMC members vote on this release (there are > no PMC votes at the moment). Another gentle nudge - we currently have one binding +1 from rjung@ and one non-binding +1 from jboynes@ Thanks Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 Konstantin Preißer changed: What|Removed |Added OS||All --- Comment #3 from Konstantin Preißer --- Note: When using Google Chrome and when the WebSocket connection fails, Chrome reports one of the following errors in the console: WebSocket connection to 'ws://localhost:8080/examples/websocket/chat' failed: Status line contains embedded null WebSocket connection to 'ws://localhost:8080/examples/websocket/chat' failed: Received unexpected continuation frame. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 --- Comment #2 from Konstantin Preißer --- Created attachment 31057 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31057&action=edit Screenshot of FF getting a raw websocket respone (2) -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 --- Comment #1 from Konstantin Preißer --- Created attachment 31056 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31056&action=edit Screenshot of FF getting a raw websocket respone (1) -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 Konstantin Preißer changed: What|Removed |Added Attachment #31055|0 |1 is patch|| -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] New: [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 Bug ID: 55799 Summary: [websocket] Stability issues when concurrently sending large messages Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: WebSocket Assignee: dev@tomcat.apache.org Reporter: kpreis...@apache.org Created attachment 31055 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31055&action=edit Test case (modifications to the Chat example) Hi, a thread on the Users List [1] described that problems can occur when sending large messages over a WebSocket connection using getBasicRemote().sendText(String). The ChatAnnotation class does not synchronize when using this method, which means that multiple threads could call RemoteEndpoint.Basic#sendText() concurrently. The JavaDoc of RemoteEndpoint.Basic says: "If the websocket connection underlying this RemoteEndpoint is busy sending a message when a call is made to send another one, for example if two threads attempt to call a send method concurrently, or if a developer attempts to send a new message while in the middle of sending an existing one, the send method called while the connection is already busy may throw an IllegalStateException." (I thought I had read earlier that the implementation should synchronize calls to methods of RemoteEndpoint.Basic instead of throwing an ISE, but maybe that has changed). When sending large Messages over Websocket using RemoteEndpoint.Basic from different threads without or with synchronization, some problems happen like: a) The WebSocket connection is suddenly closed (I guess the browser actually aborts the connections due to data corruption or Timeout errors, but I have not examined the raw data sent over TCP) b) Various Exceptions occur (see below) c) Sometimes when I open the chat.xhtml example in my browser, it shows what seems to be a raw WebSocket response instead of the .xhtml file (see added screenshots) These issues also happen after synchronizing calls to RemoteEndpoint.Basic#sendText(), but are then harder to reproduce. To reproduce: 1) Checkout Tomcat 8 trunk (r1543467) and apply the attached patch. It applies some modifications to the Chat Websocket Example, so that the Javascript sends messages in a regular interval (50 ms), and the ChatAnnotation modifies the message to be 256 times as large as the original message, and sends it back using session.getBasicRemote()#sendText(msg). 2) Build Tomcat and run it on a Windows machine (I used Windows 8.1 x64, Java 1.7.0_45 x64), using the NIO HTTP connector (default configuration). 3) Open Firefox and IE 11. With both browsers, open the Chat example (http://localhost:8080/examples/websocket/chat.xhtml). 4) Repeat the following actions in a regular interval: a) Wait several seconds (it might be that Tomcat already closes one of the two WebSocket connections in that time). b) On one of the browsers (e.g. IE), press F5 several times. 5) After some time, you can see that in one of the browsers, the WebSocket connection is suddenly closed. Tomcat will show one or more of the following exceptions (I think the IOException and ClosedChannelException are expected if the browser aborts the connection): 19-Nov-2013 23:18:39.809 SEVERE [http-nio-8080-ClientPoller-0] org.apache.tomcat.util.net.NioEndpoint.processSocket Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:624) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1165) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1122) at java.lang.Thread.run(Thread.java:744) 19-Nov-2013 23:32:16.601 SEVERE [http-nio-8080-exec-3] websocket.chat.ChatAnnotation.onError Chat Error: java.nio.channels.ClosedChannelException java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:252) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:295) at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:136) at org.apache.coyote.http11.upgrade.NioServletInputStream.fillReadBuffer(NioServletInputStream.java:136) at org.apache.coyote.http11.upgrade.NioServletInputStream.doIsReady(NioServletInputStream.java:49) at org.apache.coyote.http11.upgrade.AbstractServletInputStream.isReady(AbstractServletInputStream.java:62) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:44) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:192) at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:180) at org.apache.coyote.http11.upgrade.AbstractProces
[Bug 55798] Enabling Manager App - process and description is inadequate
https://issues.apache.org/bugzilla/show_bug.cgi?id=55798 --- Comment #2 from BJ Chippindale --- As I expected, using the documented roles only does work properly. The issue is solely with the ability to access the file in the first instance, with the pathname in server.xml not being correct in some way. This is almost sure to be linux version, Java version, user or shell dependent, as it would not have been "incorrect" as written. The fact that it did not follow links surprises and suggests that it has to do with the identity starting tomcat. If root it may not behave... but as an ordinary user it did not start. Some sort of discussion of this (if it is the case) would be a useful hint to someone looking at the document but not able to reach the manager page. respectfully BJ -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55798] Enabling Manager App - process and description is inadequate
https://issues.apache.org/bugzilla/show_bug.cgi?id=55798 BJ Chippindale changed: What|Removed |Added URL||http://tomcat.apache.org/to ||mcat-7.0-doc/manager-howto. ||html#Configuring_Manager_Ap ||plication_Access --- Comment #1 from BJ Chippindale --- Using Ubuntu 12.04 and Sun Java (so installed Java and Tomcat by hand) - this was required because another app requires the Sun Java. Did NOT do this with the default Ubuntu installer. Tomcat is installed in /usr/local/apache-tomcat-7.0.47 Java is the latest from Oracle-Sun. The following is the problem. 1. In server.xml the - had to be changed to - Where a softlink was used ( CATALINA_HOME=/usr/local/tomcat ) and tomcat is the softlink to /usr/local/apache-tomcat-7.0.47 - giving this line pathname="/usr/local/apache-tomcat-7.0.47/conf/tomcat-users.xml" it also failed. The failure is simply a repetition of the request for authentication. Nothing actually wrong with that part of the process. I am curious what sort of debugging might enable a check of the login processing itself as enabling debug down to "fine" still left me with no information that the file was not being found. This was discovered by trial and educated guesswork. There is no indication in the doc that it should be looked at. A wide range of useless information is out there on the web now, as a lot of people have this problem in some form. My tomcat-users.xml (when it finally worked) looks like this: I have no doubt that a lot of that can be pruned away. The process in the manual, no matter how carefully followed, does not result in a working login for the manager. There may be something more to this. I currently have started tomcat as "root" which troubles me... but I haven't gotten to the security doc yet and there is no discussion I've seen that says that manager won't work if you start as "root" either. respectfully BJ -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55797] Tomcat 7.0.47 crashes using server jvm.dll and APR at ntdll!ZwGetContextThread+0xa
https://issues.apache.org/bugzilla/show_bug.cgi?id=55797 Keith Mashinter changed: What|Removed |Added OS||All --- Comment #1 from Keith Mashinter --- Other notes from Tomcat startup: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8. APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55798] New: Enabling Manager App - process and description is inadequate
https://issues.apache.org/bugzilla/show_bug.cgi?id=55798 Bug ID: 55798 Summary: Enabling Manager App - process and description is inadequate Product: Tomcat 7 Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: minor Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: bjc...@computer.org -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55797] New: Tomcat 7.0.47 crashes using server jvm.dll and APR at ntdll!ZwGetContextThread+0xa
https://issues.apache.org/bugzilla/show_bug.cgi?id=55797 Bug ID: 55797 Summary: Tomcat 7.0.47 crashes using server jvm.dll and APR at ntdll!ZwGetContextThread+0xa Product: Tomcat Native Version: 1.1.29 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Library Assignee: dev@tomcat.apache.org Reporter: kmash...@yahoo.com Since recent Windows patches perhaps in combination with Tomcat 7.0.41 and Java 1.7.0_45 patches, our Tomcat instance is crashing once per week or more, 3 times so far in the past 2 weeks, each time generating a similar Windows mdmp file the size of JVM memory and stack trace to ntdll!ZwGetContextThread+0xa. I'm not sure if this is really a JVM or tcnative issue so I'm posting to both Oracle/Java and Apache/Tomcat in case anyone has similar problems. Debug session time: Tue Nov 19 08:48:46.000 2013 (UTC - 5:00) System Uptime: 2 days 3:05:00.493 Process Uptime: 0 days 0:00:26.000 This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. (510.96c): Access violation - code c005 (first/second chance not available) *** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - ntdll!ZwGetContextThread+0xa: `77271f8a c3 ret Noted in the Stack Trace: ntdll!ZwGetContextThread+0xa ntdll!RtlFindActivationContextSectionString+0x1d6 Environment: Tomcat version 7.0.47 java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) Windows 2008 R2 Standard Build 7601 Intel Xeon CPU E5405 2 GHz 2 CPU x 4 cores each -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543577 - in /tomcat/trunk/java/org/apache: jasper/servlet/JasperInitializer.java tomcat/util/descriptor/tagplugin/TagPluginParser.java tomcat/util/descriptor/tld/TldParser.java
Author: markt Date: Tue Nov 19 21:05:50 2013 New Revision: 1543577 URL: http://svn.apache.org/r1543577 Log: Rename for consistency with the rest of the Tomcat code base Modified: tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java Modified: tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java?rev=1543577&r1=1543576&r2=1543577&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java Tue Nov 19 21:05:50 2013 @@ -42,7 +42,7 @@ public class JasperInitializer implement */ public static final String VALIDATE = "org.apache.jasper.validateDescriptors"; private static final String MSG = "org.apache.jasper.servlet.JasperInitializer"; -private static final Log LOG = LogFactory.getLog(JasperInitializer.class); +private static final Log log = LogFactory.getLog(JasperInitializer.class); /** * Preload classes required at runtime by a JSP servlet so that @@ -77,8 +77,8 @@ public class JasperInitializer implement @Override public void onStartup(Set> types, ServletContext context) throws ServletException { -if (LOG.isDebugEnabled()) { -LOG.debug(Localizer.getMessage(MSG + ".onStartup", context.getServletContextName())); +if (log.isDebugEnabled()) { +log.debug(Localizer.getMessage(MSG + ".onStartup", context.getServletContextName())); } boolean validate = Boolean.parseBoolean(context.getInitParameter(VALIDATE)); Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java?rev=1543577&r1=1543576&r2=1543577&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java Tue Nov 19 21:05:50 2013 @@ -37,7 +37,7 @@ import org.xml.sax.SAXException; * Parser for Tag Plugin descriptors. */ public class TagPluginParser { -private static final Log LOG = LogFactory.getLog(TagPluginParser.class); +private static final Log log = LogFactory.getLog(TagPluginParser.class); private static final String PREFIX = "tag-plugins/tag-plugin"; private final Digester digester; private final Map plugins = new HashMap<>(); @@ -58,7 +58,7 @@ public class TagPluginParser { source.setByteStream(is); digester.parse(source); if (!handler.getWarnings().isEmpty() || !handler.getErrors().isEmpty()) { -handler.logFindings(LOG, source.getSystemId()); +handler.logFindings(log, source.getSystemId()); if (!handler.getErrors().isEmpty()) { // throw the first to indicate there was a error during processing throw handler.getErrors().iterator().next(); Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java?rev=1543577&r1=1543576&r2=1543577&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java Tue Nov 19 21:05:50 2013 @@ -32,7 +32,7 @@ import org.xml.sax.SAXException; * Parses a Tag Library Descriptor. */ public class TldParser { -private static final Log LOG = LogFactory.getLog(TldParser.class); +private static final Log log = LogFactory.getLog(TldParser.class); private final Digester digester; public TldParser(boolean namespaceAware, boolean validation) { @@ -55,7 +55,7 @@ public class TldParser { source.setByteStream(is); digester.parse(source); if (!handler.getWarnings().isEmpty() || !handler.getErrors().isEmpty()) { -handler.logFindings(LOG, source.getSystemId()); +handler.logFindings(log, source.getSystemId()); if (!handler.getErrors().isEmpty()) { // throw the first to indicate there was a error during processing throw handler.getErrors().iterator().next(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.ap
svn commit: r1543476 - /tomcat/trunk/java/org/apache/jasper/Constants.java
Author: markt Date: Tue Nov 19 16:27:58 2013 New Revision: 1543476 URL: http://svn.apache.org/r1543476 Log: Remove unused constants Modified: tomcat/trunk/java/org/apache/jasper/Constants.java Modified: tomcat/trunk/java/org/apache/jasper/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Constants.java?rev=1543476&r1=1543475&r2=1543476&view=diff == --- tomcat/trunk/java/org/apache/jasper/Constants.java (original) +++ tomcat/trunk/java/org/apache/jasper/Constants.java Tue Nov 19 16:27:58 2013 @@ -14,14 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper; import java.util.Arrays; import java.util.Collections; import java.util.List; - /** * Some constants and other global data that are used by the compiler and the runtime. * @@ -115,62 +113,6 @@ public class Constants { public static final String TAG_FILE_PACKAGE_NAME = System.getProperty("org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME", "org.apache.jsp.tag"); -// Must be kept in sync with org/apache/catalina/Globals.java -public static final String ALT_DD_ATTR = -System.getProperty("org.apache.jasper.Constants.ALT_DD_ATTR", "org.apache.catalina.deploy.alt_dd"); - -/** - * Public Id and the Resource path (of the cached copy) - * of the DTDs for tag library descriptors. - */ -private static final String TAGLIB_DTD_PUBLIC_ID_11 = -"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"; -private static final String TAGLIB_DTD_RESOURCE_PATH_11 = -"/javax/servlet/resources/web-jsptaglibrary_1_1.dtd"; -private static final String TAGLIB_DTD_PUBLIC_ID_12 = -"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"; -private static final String TAGLIB_DTD_RESOURCE_PATH_12 = -"/javax/servlet/resources/web-jsptaglibrary_1_2.dtd"; - -/** - * Public Id and the Resource path (of the cached copy) - * of the DTDs for web application deployment descriptors - */ -private static final String WEBAPP_DTD_PUBLIC_ID_22 = -"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; -private static final String WEBAPP_DTD_RESOURCE_PATH_22 = -"/javax/servlet/resources/web-app_2_2.dtd"; -private static final String WEBAPP_DTD_PUBLIC_ID_23 = -"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"; -private static final String WEBAPP_DTD_RESOURCE_PATH_23 = -"/javax/servlet/resources/web-app_2_3.dtd"; - -/** - * List of the Public IDs that we cache, and their - * associated location. This is used by - * an EntityResolver to return the location of the - * cached copy of a DTD. - */ -// TODO Add 2.4, 2.5, 3.0 -private static final String[] PRIVATE_CACHED_DTD_PUBLIC_IDS = { -TAGLIB_DTD_PUBLIC_ID_11, -TAGLIB_DTD_PUBLIC_ID_12, -WEBAPP_DTD_PUBLIC_ID_22, -WEBAPP_DTD_PUBLIC_ID_23, -}; -public static final List CACHED_DTD_PUBLIC_IDS = -Collections.unmodifiableList( -Arrays.asList(PRIVATE_CACHED_DTD_PUBLIC_IDS)); -private static final String[] PRIVATE_CACHED_DTD_RESOURCE_PATHS = { -TAGLIB_DTD_RESOURCE_PATH_11, -TAGLIB_DTD_RESOURCE_PATH_12, -WEBAPP_DTD_RESOURCE_PATH_22, -WEBAPP_DTD_RESOURCE_PATH_23, -}; -public static final List CACHED_DTD_RESOURCE_PATHS = -Collections.unmodifiableList( -Arrays.asList(PRIVATE_CACHED_DTD_RESOURCE_PATHS)); - /** * Default URLs to download the plugin for Netscape and IE. */ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543464 - /tomcat/trunk/java/org/apache/catalina/Context.java
Author: markt Date: Tue Nov 19 15:55:37 2013 New Revision: 1543464 URL: http://svn.apache.org/r1543464 Log: Re-order / clean-up. No functional change. Modified: tomcat/trunk/java/org/apache/catalina/Context.java Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1543464&r1=1543463&r2=1543464&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Tue Nov 19 15:55:37 2013 @@ -583,15 +583,21 @@ public interface Context extends Contain /** * Get the server.xml attribute's xmlNamespaceAware. * @return true if namespace awareness is enabled. - * */ public boolean getXmlNamespaceAware(); /** + * Set the namespace aware feature of the XML parser used when + * parsing xml instances. + * @param xmlNamespaceAware true to enable namespace awareness + */ +public void setXmlNamespaceAware(boolean xmlNamespaceAware); + + +/** * Get the server.xml attribute's xmlValidation. * @return true if validation is enabled. - * */ public boolean getXmlValidation(); @@ -604,13 +610,6 @@ public interface Context extends Contain public void setXmlValidation(boolean xmlValidation); - /** - * Set the namespace aware feature of the XML parser used when - * parsing xml instances. - * @param xmlNamespaceAware true to enable namespace awareness - */ -public void setXmlNamespaceAware(boolean xmlNamespaceAware); - /** * Get the Jar Scanner to be used to scan for JAR resources for this * context. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543385 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
Author: kkolinko Date: Tue Nov 19 11:17:55 2013 New Revision: 1543385 URL: http://svn.apache.org/r1543385 Log: Merged r1543383 from tomcat/trunk: Followup to r1456457 Correct typo in the name of a private field Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1543383 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1543385&r1=1543384&r2=1543385&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Tue Nov 19 11:17:55 2013 @@ -90,7 +90,7 @@ public class JSSESocketFactory implement private static final boolean RFC_5746_SUPPORTED; private static final String[] DEFAULT_SERVER_PROTOCOLS; -private static final String[] DEAFULT_SERVER_CIPHER_SUITES; +private static final String[] DEFAULT_SERVER_CIPHER_SUITES; // Defaults - made public where re-used private static final String defaultProtocol = "TLS"; @@ -137,7 +137,7 @@ public class JSSESocketFactory implement // Unable to determine default ciphers/protocols so use none } RFC_5746_SUPPORTED = result; -DEAFULT_SERVER_CIPHER_SUITES = ciphers; +DEFAULT_SERVER_CIPHER_SUITES = ciphers; DEFAULT_SERVER_PROTOCOLS = protocols; } @@ -231,7 +231,7 @@ public class JSSESocketFactory implement } if ((requestedCiphersStr == null) || (requestedCiphersStr.trim().length() == 0)) { -return DEAFULT_SERVER_CIPHER_SUITES; +return DEFAULT_SERVER_CIPHER_SUITES; } List requestedCiphers = new ArrayList(); @@ -242,7 +242,7 @@ public class JSSESocketFactory implement } } if (requestedCiphers.isEmpty()) { -return DEAFULT_SERVER_CIPHER_SUITES; +return DEFAULT_SERVER_CIPHER_SUITES; } List ciphers = new ArrayList(requestedCiphers); ciphers.retainAll(Arrays.asList(context.getSupportedSSLParameters() - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543383 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
Author: kkolinko Date: Tue Nov 19 11:12:54 2013 New Revision: 1543383 URL: http://svn.apache.org/r1543383 Log: Followup to r1456457 Correct typo in the name of a private field Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1543383&r1=1543382&r2=1543383&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Tue Nov 19 11:12:54 2013 @@ -90,7 +90,7 @@ public class JSSESocketFactory implement private static final boolean RFC_5746_SUPPORTED; private static final String[] DEFAULT_SERVER_PROTOCOLS; -private static final String[] DEAFULT_SERVER_CIPHER_SUITES; +private static final String[] DEFAULT_SERVER_CIPHER_SUITES; // Defaults - made public where re-used private static final String defaultProtocol = "TLS"; @@ -137,7 +137,7 @@ public class JSSESocketFactory implement // Unable to determine default ciphers/protocols so use none } RFC_5746_SUPPORTED = result; -DEAFULT_SERVER_CIPHER_SUITES = ciphers; +DEFAULT_SERVER_CIPHER_SUITES = ciphers; DEFAULT_SERVER_PROTOCOLS = protocols; } @@ -231,7 +231,7 @@ public class JSSESocketFactory implement } if ((requestedCiphersStr == null) || (requestedCiphersStr.trim().length() == 0)) { -return DEAFULT_SERVER_CIPHER_SUITES; +return DEFAULT_SERVER_CIPHER_SUITES; } List requestedCiphers = new ArrayList<>(); @@ -242,7 +242,7 @@ public class JSSESocketFactory implement } } if (requestedCiphers.isEmpty()) { -return DEAFULT_SERVER_CIPHER_SUITES; +return DEFAULT_SERVER_CIPHER_SUITES; } List ciphers = new ArrayList<>(requestedCiphers); ciphers.retainAll(Arrays.asList(context.getSupportedSSLParameters() - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543376 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java
Author: kkolinko Date: Tue Nov 19 11:05:17 2013 New Revision: 1543376 URL: http://svn.apache.org/r1543376 Log: Correct a typo Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1543376&r1=1543375&r2=1543376&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Nov 19 11:05:17 2013 @@ -299,7 +299,7 @@ public class Request /** - * The Subject associated with the current AccessControllerContext + * The Subject associated with the current AccessControlContext */ protected transient Subject subject = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55719] WAR's deployed via Tomcat Manager using Cargo deployer are getting corrupted.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55719 Mark Thomas changed: What|Removed |Added Status|NEW |NEEDINFO -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543360 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Nov 19 09:58:40 2013 New Revision: 1543360 URL: http://svn.apache.org/r1543360 Log: Formatting (line length) Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1543360&r1=1543359&r2=1543360&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 19 09:58:40 2013 @@ -93,7 +93,12 @@ PATCHES PROPOSED TO BACKPORT: * Better adherence to RFC2616 for content-length headers. http://people.apache.org/~markt/patches/2013-09-11-tc6-content-length.patch +1: markt - +0: schultz: I don't see anywhere in RFC2616 that suggests that multiple Content-Length headers yields an invalid request. Another option for response code in this case might be 411 Length Required. There are some conditions under which Content-Type "RFC MUST" be ignored, and I don't see those cases in any of the *Processor classes. + +0: schultz: I don't see anywhere in RFC2616 that suggests that multiple + Content-Length headers yields an invalid request. Another option + for response code in this case might be 411 Length Required. + There are some conditions under which Content-Type "RFC MUST" be + ignored, and I don't see those cases in any of the *Processor + classes. markt: RFC2616 states that multiple headers of the same name may be merged in to a single, multi-valued header without any change in meaning. Content-Length is clearly defined as a single value - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543359 - /tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java
Author: markt Date: Tue Nov 19 09:53:46 2013 New Revision: 1543359 URL: http://svn.apache.org/r1543359 Log: Add an initial unit test for the WebappClassLoader Added: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java (with props) Added: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java?rev=1543359&view=auto == --- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java (added) +++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java Tue Nov 19 09:53:46 2013 @@ -0,0 +1,62 @@ +/* + * 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.loader; + +import java.io.File; +import java.net.URL; +import java.net.URLClassLoader; + +import org.junit.Assert; +import org.junit.Test; + +import org.apache.catalina.core.StandardContext; +import org.apache.catalina.startup.Tomcat; +import org.apache.catalina.startup.TomcatBaseTest; + +public class TestWebappClassLoader extends TomcatBaseTest { + +@Test +public void testGetURLs() throws Exception { +File f = new File("test/webresources/war-url-connection.war"); + +String[] expected = new String[2]; +String warUrl = f.toURI().toURL().toExternalForm(); +expected[0] = "jar:" + warUrl + "!/WEB-INF/classes/"; +expected[1] = "jar:" + warUrl + "!/WEB-INF/lib/test.jar"; + +Tomcat tomcat = getTomcatInstance(); +// Must have a real docBase - just use temp +StandardContext ctx = +(StandardContext)tomcat.addContext("", f.getAbsolutePath()); + +tomcat.start(); + +ClassLoader cl = ctx.getLoader().getClassLoader(); + +Assert.assertTrue(cl instanceof URLClassLoader); + +try (URLClassLoader ucl = (URLClassLoader) cl) { +URL[] urls = ucl.getURLs(); +Assert.assertEquals(expected.length, urls.length); +String[] actual = new String[urls.length]; +for (int i = 0; i < urls.length; i++) { +actual[i] = urls[i].toExternalForm(); +} +Assert.assertArrayEquals(expected, actual); +} +} +} Propchange: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55792] EL expression containing a map is not parsed correctly. '}' is interpreted as closing brace of the EL expression.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55792 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Mark Thomas --- Nick, thanks for the report. Konstantin, thanks for the test case. Thsi has been fixed in trunk and will be in 8.0.0-RC6 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543356 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
Author: markt Date: Tue Nov 19 09:41:24 2013 New Revision: 1543356 URL: http://svn.apache.org/r1543356 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55792 EL 3.0 introduced the possibility of nested {...} sequences within EL expressions so update the JSP parser to handle them. Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1543356&r1=1543355&r2=1543356&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Tue Nov 19 09:41:24 2013 @@ -736,14 +736,16 @@ class Parser implements TagConstants { } /* - * ELExpressionBody (following "${" to first unquoted "}") // XXX add formal - * production and confirm implementation against it, // once it's decided + * ELExpressionBody. Starts with "#{" or "${". Ends with "}".May contain + * quoted "{", "}", '{', or '}' and nested "{...}" */ private void parseELExpression(Node parent, char type) throws JasperException { start = reader.mark(); Mark last = null; -boolean singleQuoted = false, doubleQuoted = false; +boolean singleQuoted = false; +boolean doubleQuoted = false; +int nesting = 0; int currentChar; do { // XXX could move this logic to JspReader @@ -756,11 +758,20 @@ class Parser implements TagConstants { } if (currentChar == -1) err.jspError(start, "jsp.error.unterminated", type + "{"); -if (currentChar == '"' && !singleQuoted) +if (currentChar == '"' && !singleQuoted) { doubleQuoted = !doubleQuoted; -if (currentChar == '\'' && !doubleQuoted) +} else if (currentChar == '\'' && !doubleQuoted) { singleQuoted = !singleQuoted; -} while (currentChar != '}' || (singleQuoted || doubleQuoted)); +} else if (currentChar == '{' && !doubleQuoted && !singleQuoted) { +nesting++; +} else if (currentChar =='}' && !doubleQuoted && !singleQuoted) { +// Note: This also matches the terminating '}' at which point +// nesting will be set to -1 - hence the test for +// while (currentChar != '}' || nesting > -1 ||...) below +// to continue the loop until the final '}' is detected +nesting--; +} +} while (currentChar != '}' || singleQuoted || doubleQuoted || nesting > -1); @SuppressWarnings("unused") Node unused = new Node.ELExpression( - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543355 - in /tomcat/trunk/test: org/apache/el/TestELInJsp.java webapp/el-misc.jsp
Author: markt Date: Tue Nov 19 09:38:53 2013 New Revision: 1543355 URL: http://svn.apache.org/r1543355 Log: Add kkolinko's unit test for https://issues.apache.org/bugzilla/show_bug.cgi?id=55792 Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java tomcat/trunk/test/webapp/el-misc.jsp Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELInJsp.java?rev=1543355&r1=1543354&r2=1543355&view=diff == --- tomcat/trunk/test/org/apache/el/TestELInJsp.java (original) +++ tomcat/trunk/test/org/apache/el/TestELInJsp.java Tue Nov 19 09:38:53 2013 @@ -391,6 +391,9 @@ public class TestELInJsp extends TomcatB assertEcho(result, "17-foo\\bar\\baz"); assertEcho(result, "18-3"); assertEcho(result, "19-4"); +assertEcho(result, "20-4"); +assertEcho(result, "21-[{value=11}, {value=12}, {value=13}, {value=14}]"); +assertEcho(result, "22-[{value=11}, {value=12}, {value=13}, {value=14}]"); } @Test Modified: tomcat/trunk/test/webapp/el-misc.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/el-misc.jsp?rev=1543355&r1=1543354&r2=1543355&view=diff == --- tomcat/trunk/test/webapp/el-misc.jsp (original) +++ tomcat/trunk/test/webapp/el-misc.jsp Tue Nov 19 09:38:53 2013 @@ -38,5 +38,7 @@ - +20-${{1,2,3,4}.stream().max().orElse(-1)} + +22-${{1,2,3,4}.stream().sorted().map(u->{"value":u+10}).toList()} \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1543353 - /tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java
Author: markt Date: Tue Nov 19 09:08:08 2013 New Revision: 1543353 URL: http://svn.apache.org/r1543353 Log: Fix regression introduced in r1445964. Extract the correct lines from the JSP when displaying the error Modified: tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java?rev=1543353&r1=1543352&r2=1543353&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java Tue Nov 19 09:08:08 2013 @@ -82,6 +82,8 @@ public class JavacErrorDetail { this.javaLineNum = javaLineNum; this.errMsg = errMsg; this.jspFileName = jspFileName; +// Note: this.jspBeginLineNum is set at the end of this method as it may +// be modified (corrected) during the execution of this method if (jspBeginLineNum > 0 && ctxt != null) { InputStream is = null; @@ -120,9 +122,9 @@ public class JavacErrorDetail { // copy out a fragment of JSP to display to the user StringBuilder fragment = new StringBuilder(1024); -int startIndex = Math.max(0, this.jspBeginLineNum-1-3); +int startIndex = Math.max(0, jspBeginLineNum-1-3); int endIndex = Math.min( -jspLines.length-1, this.jspBeginLineNum-1+3); +jspLines.length-1, jspBeginLineNum-1+3); for (int i=startIndex;i<=endIndex; ++i) { fragment.append(i+1); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org