DO NOT REPLY [Bug 45032] New: ContainerBase.removeChild() throws ConcurrentModificationException
https://issues.apache.org/bugzilla/show_bug.cgi?id=45032 Summary: ContainerBase.removeChild() throws ConcurrentModificationException Product: Tomcat 6 Version: 6.0.16 Platform: PC OS/Version: Windows Vista Status: NEW Severity: major Priority: P1 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Tomcat 6.0.16 sometimes throws a ConcurrentModificationException when trying to stop a context. Here is the stack trace: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at java.util.HashMap.putAllForCreate(HashMap.java:435) at java.util.HashMap.clone(HashMap.java:669) at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1594) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1497) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4550) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924) at de.disy.vcc.service.TomcatContextService.stopContext(TomcatContextService.java:174) at de.disy.vcc.service.AdminService.stopMandant(AdminService.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy186.stopMandant(Unknown Source) at de.disy.vcc.web.admin.MandantOverviewController.handleStop(MandantOverviewController.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:473) at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:410) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at net.disy.commons.servlet.filter.IECacheSSLBugWorkaroundFilter.doFilter(IECacheSSLBugWorkaroundFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.
DO NOT REPLY [Bug 45032] ContainerBase.removeChild() throws ConcurrentModificationException
https://issues.apache.org/bugzilla/show_bug.cgi?id=45032 Igor Friedrich <[EMAIL PROTECTED]> changed: What|Removed |Added OS/Version|Windows Vista |Linux -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 43285] Missing EL Coercion causes argument type mismatch
https://issues.apache.org/bugzilla/show_bug.cgi?id=43285 Nils Eckert <[EMAIL PROTECTED]> changed: What|Removed |Added Attachment #21962|0 |1 is obsolete|| --- Comment #12 from Nils Eckert <[EMAIL PROTECTED]> 2008-05-19 04:11:14 PST --- Created an attachment (id=21981) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21981) Proposed patch taking care of primitive types (configurable) Configurable with VM-parameter "org.apache.catalina.STRICT_JSP_COMPLIANCE" -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 43285] Missing EL Coercion causes argument type mismatch
https://issues.apache.org/bugzilla/show_bug.cgi?id=43285 Nils Eckert <[EMAIL PROTECTED]> changed: What|Removed |Added Attachment #21981|0 |1 is obsolete|| --- Comment #13 from Nils Eckert <[EMAIL PROTECTED]> 2008-05-19 04:23:09 PST --- Created an attachment (id=21982) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21982) Proposed patch taking care of primitive types (configurable) I renamed the parameter to "org.apache.catalina.STRICT_JSP_COMPLIANCE" and had forgotten to refactor the corresponding field-name. Please feel free to rename this field / parameter if needed. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 45040] New: null string from web is converted to 0 in JSF
https://issues.apache.org/bugzilla/show_bug.cgi?id=45040 Summary: null string from web is converted to 0 in JSF Product: Tomcat 6 Version: 6.0.16 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] My Environment is JSF 1.2(sun RI)+facelet+tomcat 6.0.16. There is an integer field in my web form. I monitored the submitted form using the tcpmon. The value is indeed empty. Debugging confirmed that the submitted value is empty. However, when it is "update model" in JSF, the value becomes Integer(0) while I expect a null object. I traced the code down to AstValue.setValue() line 1132:resolver.setValue(ctx, t.base, t.property, // coerce to the expected type ELSupport.coerceToType(value, resolver.getType(ctx, t.base, t.property))); which calls java/org/apache/el/lang/ELSupport.java line 198: public final static Number coerceToNumber(final Object obj) { line 199:if (obj == null) { line 200: return ZERO; The ELSupport here converts a null object to zero object. This makes it impossible to differentiate "an empty field" from "a field with 0" from web in JSF model object. Maybe the setValue in AstValue should be changed to resolver.setValue(ctx, t.base, t.property, value==null?null: ELSupport.coerceToType(value, resolver.getType(ctx, t.base, t.property))); thanks -jason -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 43285] Missing EL Coercion causes argument type mismatch
https://issues.apache.org/bugzilla/show_bug.cgi?id=43285 Mark Thomas <[EMAIL PROTECTED]> changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Comment #14 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 11:49:04 PST --- *** Bug 45040 has been marked as a duplicate of this bug. *** -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 45040] null string from web is converted to 0 in JSF
https://issues.apache.org/bugzilla/show_bug.cgi?id=45040 Mark Thomas <[EMAIL PROTECTED]> changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 11:49:04 PST --- This behaviour us as oer the soec *** This bug has been marked as a duplicate of bug 43285 *** -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 45040] null string from web is converted to 0 in JSF
https://issues.apache.org/bugzilla/show_bug.cgi?id=45040 --- Comment #2 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 11:55:39 PST --- Sorry about the typing. It should have said "as per the spec" -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r657923 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: yoavs Date: Mon May 19 12:12:01 2008 New Revision: 657923 URL: http://svn.apache.org/viewvc?rev=657923&view=rev Log: add my vote on proposed patches 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=657923&r1=657922&r2=657923&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon May 19 12:12:01 2008 @@ -42,7 +42,7 @@ * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=44282 Do call to getClassLoader() in a privileged block. http://svn.apache.org/viewvc?rev=616953&view=rev - +1: markt, fhanik + +1: markt, fhanik, yoavs +0: remm: do we really want to fix these sort of "bugs" ? -1: @@ -54,12 +54,12 @@ * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44955 Use correct location for endorsed dir http://svn.apache.org/viewvc?rev=654632&view=rev - +1: markt, remm + +1: markt, remm, yoavs -1: * Fix NPE in patch for bug 44986 http://svn.apache.org/viewvc?rev=657149&view=rev - +1: markt, remm + +1: markt, remm, yoavs -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015 @@ -73,12 +73,12 @@ Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} works http://svn.apache.org/viewvc?rev=657404&view=rev Note patch is larger than strictly necessary due to autogenerated code - +1: markt + +1: markt, yoavs -1: * Additional patch from https://issues.apache.org/bugzilla/show_bug.cgi?id=43094 Allow configuration of JSSE providers Based on a patch by Bruno Harbulot http://svn.apache.org/viewvc?rev=657449&view=rev - +1: markt + +1: markt, yoavs -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r657954 - in /tomcat/trunk/java/org/apache/coyote/http11: InternalAprInputBuffer.java InternalInputBuffer.java InternalNioInputBuffer.java
Author: markt Date: Mon May 19 13:07:20 2008 New Revision: 657954 URL: http://svn.apache.org/viewvc?rev=657954&view=rev Log: Note: This patch is on the critical path. Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42750 Making parsing of the request line tolerant of multiple SP and/or HT rather than requiring single SP characters. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=657954&r1=657953&r2=657954&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Mon May 19 13:07:20 2008 @@ -403,7 +403,8 @@ throw new EOFException(sm.getString("iib.eof.error")); } -if (buf[pos] == Constants.SP) { +// Spec says single SP but it also says be tolerant of HT +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { space = true; request.method().setBytes(buf, start, pos - start); } @@ -412,6 +413,20 @@ } +// Spec says single SP but also says be tolerant of multiple and/or HT +while (space) { +// Read new bytes if needed +if (pos >= lastValid) { +if (!fill()) +throw new EOFException(sm.getString("iib.eof.error")); +} +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { +pos++; +} else { +space = false; +} +} + // Mark the current buffer position start = pos; int end = 0; @@ -421,7 +436,6 @@ // Reading the URI // -space = false; boolean eol = false; while (!space) { @@ -432,7 +446,8 @@ throw new EOFException(sm.getString("iib.eof.error")); } -if (buf[pos] == Constants.SP) { +// Spec says single SP but it also says be tolerant of HT +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { space = true; end = pos; } else if ((buf[pos] == Constants.CR) @@ -459,6 +474,21 @@ request.requestURI().setBytes(buf, start, end - start); } +// Spec says single SP but also says be tolerant of multiple and/or HT +while (space) { +// Read new bytes if needed +if (pos >= lastValid) { +if (!fill()) +throw new EOFException(sm.getString("iib.eof.error")); +} +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { +pos++; +} else { +space = false; +} +} + + // Mark the current buffer position start = pos; end = 0; Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java?rev=657954&r1=657953&r2=657954&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Mon May 19 13:07:20 2008 @@ -391,7 +391,8 @@ throw new EOFException(sm.getString("iib.eof.error")); } -if (buf[pos] == Constants.SP) { +// Spec says single SP but it also says be tolerant of HT +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { space = true; request.method().setBytes(buf, start, pos - start); } @@ -400,6 +401,21 @@ } + +// Spec says single SP but also says be tolerant of multiple and/or HT +while (space) { +// Read new bytes if needed +if (pos >= lastValid) { +if (!fill()) +throw new EOFException(sm.getString("iib.eof.error")); +} +if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) { +pos++; +} else { +space = false; +} +} + // Mark the current buffer position start = pos; int end = 0; @@ -409,7 +425,6 @@ // Reading the URI // -space = false; boolean eol = false; while (!space) { @@ -420,7
svn commit: r657956 - /tomcat/current/tc5.5.x/STATUS.txt
Author: markt Date: Mon May 19 13:09:41 2008 New Revision: 657956 URL: http://svn.apache.org/viewvc?rev=657956&view=rev Log: Propose fix for 42750 Modified: tomcat/current/tc5.5.x/STATUS.txt Modified: tomcat/current/tc5.5.x/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=657956&r1=657955&r2=657956&view=diff == --- tomcat/current/tc5.5.x/STATUS.txt (original) +++ tomcat/current/tc5.5.x/STATUS.txt Mon May 19 13:09:41 2008 @@ -226,3 +226,10 @@ http://svn.apache.org/viewvc?rev=657231&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42750 + Make parsing of request line more tolerant of multiple SP and/or HT + Note: This is on the critical path + http://svn.apache.org/viewvc?rev=657954&view=rev + +1: markt + -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r657957 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Mon May 19 13:09:58 2008 New Revision: 657957 URL: http://svn.apache.org/viewvc?rev=657957&view=rev Log: Propose fix for 42750 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=657957&r1=657956&r2=657957&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon May 19 13:09:58 2008 @@ -82,3 +82,10 @@ http://svn.apache.org/viewvc?rev=657449&view=rev +1: markt, yoavs -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42750 + Make parsing of request line more tolerant of multiple SP and/or HT + Note: This is on the critical path + http://svn.apache.org/viewvc?rev=657954&view=rev + +1: markt + -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 42750] Http Post requests not handled correctly if there is more than one space between the "POST" and the URL
https://issues.apache.org/bugzilla/show_bug.cgi?id=42750 --- Comment #5 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 13:10:23 PST --- I have committed a patch to trunk that makes the parsing of the request line tolerant of multiple SP and/or HT. The patch has been proposed it for 6.0.x and 5.5.x I have also tested the example given in comment #4 and cannot reproduce that issue. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 45032] ContainerBase.removeChild() throws ConcurrentModificationException
https://issues.apache.org/bugzilla/show_bug.cgi?id=45032 Mark Thomas <[EMAIL PROTECTED]> changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #1 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 13:20:38 PST --- To quote from the new system props doc that will be in 6.0.17 onwards... org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES If true, Tomcat attempts to null out any static or final fields from loaded classes when a web application is stopped as a work around for apparent garbage collection bugs and application coding errors. There have been some issues reported with log4j when this option is true. Applications without memory leaks using recent JVMs should operate correctly with this option set to false. If not specified, the default value of true will be used. The bug you are seeing is a result of this system property defaulting to true. If your application and any libraries it uses clean up correctly after themselves on context stop you should be safe to set this system property to false and the error should go away. Changing the default to false would fix this error. However, this property has fixed a number of other issue so on balance a default of true is probably the right way to go for now. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r657995 - /tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
Author: markt Date: Mon May 19 14:47:19 2008 New Revision: 657995 URL: http://svn.apache.org/viewvc?rev=657995&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747. Actually fixes a number of related bugs: - For a new WAR, use META-INF/context.xml for first initiation rather than copying it then using it on next start - For a new dir, use META-INF/context.xml for first initiation - For a new dir, copy any META-INF/context.xml to $CATALINA_BASE/[engine]/[host]/contextPath.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=657995&r1=657994&r2=657995&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Mon May 19 14:47:19 2008 @@ -21,6 +21,7 @@ import java.io.BufferedOutputStream; import java.io.File; +import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -814,7 +815,26 @@ (dir.getAbsolutePath(), new Long(dir.lastModified())); try { -Context context = (Context) Class.forName(contextClass).newInstance(); +Context context = null; +if (deployXML && xml.exists()) { +synchronized (digester) { +try { +context = (Context) digester.parse(xml); +if (context == null) { + log.error(sm.getString("hostConfig.deployDescriptor.error", +file)); +return; +} +} finally { +digester.reset(); +} +} +context.setConfigFile(xml.getAbsolutePath()); +deployedApp.redeployResources.put +(xml.getAbsolutePath(), new Long(xml.lastModified())); +} else { +context = (Context) Class.forName(contextClass).newInstance(); +} if (context instanceof Lifecycle) { Class clazz = Class.forName(host.getConfigClass()); LifecycleListener listener = @@ -823,11 +843,6 @@ } context.setPath(contextPath); context.setDocBase(file); -if (xml.exists()) { -context.setConfigFile(xml.getAbsolutePath()); -deployedApp.redeployResources.put -(xml.getAbsolutePath(), new Long(xml.lastModified())); -} host.addChild(context); // If we're unpacking WARs, the docBase will be mutated after // starting the context @@ -911,7 +926,78 @@ if( log.isDebugEnabled() ) log.debug(sm.getString("hostConfig.deployDir", file)); try { -Context context = (Context) Class.forName(contextClass).newInstance(); +// Checking for a /META-INF/context.xml +InputStream istream = null; +BufferedOutputStream ostream = null; +File xml = new File +(configBase, file + ".xml"); +if (deployXML && !xml.exists()) { +try { +File applicationContextXml = +new File(dir, Constants.ApplicationContextXml); +if (applicationContextXml.exists()) { +istream = new FileInputStream(applicationContextXml); + +configBase.mkdirs(); + +ostream = +new BufferedOutputStream +(new FileOutputStream(xml), 1024); +byte buffer[] = new byte[1024]; +while (true) { +int n = istream.read(buffer); +if (n < 0) { +break; +} +ostream.write(buffer, 0, n); +} +ostream.flush(); +ostream.close(); +ostream = null; +istream.close(); +istream = null; +} +} catch (Exception e) { +// Ignore and continue +if (ostream != null) { +try { +ostream.close(); +} catch (Throwable t) { +// Ignore +} +ostream = null; +
svn commit: r657996 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Mon May 19 14:49:26 2008 New Revision: 657996 URL: http://svn.apache.org/viewvc?rev=657996&view=rev Log: Propose fix for 42747 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=657996&r1=657995&r2=657996&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon May 19 14:49:26 2008 @@ -89,3 +89,10 @@ http://svn.apache.org/viewvc?rev=657954&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747 + Use any META-INF/context.xml in a consistent manner and ensure it is used on + initial deployment + http://svn.apache.org/viewvc?rev=657995&view=rev + +1: markt + -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 42747] Context className attribute ignored for contexts deployed from descriptors in web /META-INF/context.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=42747 --- Comment #1 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-19 14:49:34 PST --- This issue and some related issues have been fixed in trunk and proposed for 6.0.x -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r658040 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: remm Date: Mon May 19 16:30:07 2008 New Revision: 658040 URL: http://svn.apache.org/viewvc?rev=658040&view=rev Log: - Votes. 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=658040&r1=658039&r2=658040&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon May 19 16:30:07 2008 @@ -73,14 +73,14 @@ Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} works http://svn.apache.org/viewvc?rev=657404&view=rev Note patch is larger than strictly necessary due to autogenerated code - +1: markt, yoavs + +1: markt, yoavs, remm -1: * Additional patch from https://issues.apache.org/bugzilla/show_bug.cgi?id=43094 Allow configuration of JSSE providers Based on a patch by Bruno Harbulot http://svn.apache.org/viewvc?rev=657449&view=rev - +1: markt, yoavs + +1: markt, yoavs, remm -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42750 @@ -88,11 +88,15 @@ Note: This is on the critical path http://svn.apache.org/viewvc?rev=657954&view=rev +1: markt - -1: + -1: remm (the library causing this bug cannot possibly have read the little +hidden, optional appendix from the HTTP/1.0 spec, and rely on it, so it is simply broken; +it may not apply to HTTP/1.1, which may be more strict; passing full URLs in the +request line is normally an HTTP/1.1 thing, from what I remember, usable as an alternative +to the mandatory Host header) * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747 Use any META-INF/context.xml in a consistent manner and ensure it is used on initial deployment http://svn.apache.org/viewvc?rev=657995&view=rev +1: markt - -1: + -1: remm (would need convincing that this is really well tested, otherwise delay to next release) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]