Re: [taglibs] Null handling in Functions
I work on a patch to remove them and add JavaDoc. What do you think of adding JSR-303 javax.validation annotations like NotNull? Those are part of JavaEE 6 so are guaranteed to be available there but would require a dependency for a JavaEE5 environment. My thought would be not to use them yet. Jeremy On Jul 4, 2010, at 11:36 PM, Henri Yandell wrote: > Agreed on 1.18.2. For String params (and Number, Character and > Boolean) it looks like Functions should be able to assume that they're > null-safe. > > Hen > > On Sun, Jul 4, 2010 at 12:20 PM, Jeremy Boynes wrote: >> Different methods in our Functions implementation handle null parameters >> inconsistently; for example, toUpperCase does not perform any null check >> whereas indexOf does. If I grok the EL spec correctly, all String parameter >> values should be coerced by the rules in 1.18.2 which would guarantee that >> nulls are converted to "" and hence the null checks in the implementation >> are redundant. I confirmed that the EL implementation in Tomcat 7 [1] does >> this. >> >> My thought would be to remove them and rely on the JSP Engine to coerce >> correctly. If this isn't safe then we should add similar checks to the other >> methods. >> >> Thoughts? >> Thanks >> Jeremy >> >> [1] >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?view=markup#l405 >> called from AstFunction#getValue >> - >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> >> > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r960104 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
ma...@apache.org wrote: Author: markt Date: Fri Jul 2 21:13:25 2010 New Revision: 960104 URL: http://svn.apache.org/viewvc?rev=960104&view=rev Log: A few more FindBugs issues > ... why don't you integrate checkstyle (and FindBugs) in the build? It's the only safe way to ensure quality and to avoid useless style discussions. Or is the number of Tomcat commits still a marketing argument for SpringSource? ;-) Cheers, Marc. -- Blog: http://mguillem.wordpress.com - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 --- Comment #5 from Pieter Libin 2010-07-05 03:55:31 EDT --- (In reply to comment #1) > Please could you confirm that the test case is provided under the terms of > section 5 of the Apache License, v2 and that you have the right to provide > this > code under those terms. The header in the test case seems to suggest > otherwise. Yes, that's fine. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 --- Comment #6 from Pieter Libin 2010-07-05 03:56:31 EDT --- (In reply to comment #4) > I have reverted the original fix and applied a new fix that fixes the issue > described here and still passes the Servlet TCK. Thanks for the quick fix! I'll give it a try. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47692] Can not compile mod_jk with apache2.0.63 and tomcat-connectors-1.2.28
https://issues.apache.org/bugzilla/show_bug.cgi?id=47692 --- Comment #5 from ganggaroo 2010-07-05 04:03:29 EDT --- Hi , I am a newbee on AIX...I found this article after hard googling. I think my trouble is somewhat related so I want to hear your advices.. I want apache-tomcat server on AIX 6.1 I tried make after configuring some minutes later there is error like this. libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' make[3]: *** [maketables.lo] Error 1 make[3]: Leaving directory `/app/ci/ppsl/download/httpd-2.2.13/srclib/pcre' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/app/ci/ppsl/download/httpd-2.2.13/srclib/pcre' make[1]: *** [all-recursive] Error 1 I can't find any answer on the whole internet sites.. help me please...thanks -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r960104 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
On 05/07/2010 09:27, Marc Guillemot wrote: ma...@apache.org wrote: Author: markt Date: Fri Jul 2 21:13:25 2010 New Revision: 960104 URL: http://svn.apache.org/viewvc?rev=960104&view=rev Log: A few more FindBugs issues > ... why don't you integrate checkstyle (and FindBugs) in the build? The Tomcat code doesn't follow any standards consistently so the number of warnings that would get reported is huge. As far as I am aware the actual problems have been fixed. The remaining issues are cosmetic. There may be some real issues hiding in there somewhere but if there are, they aren't things that users are reporting as problems else there would be a bugzilla entry for it. I don't think (I could be wrong) there is much interest in investing a lot of effort in a bug code clean-up. Gradual improvement seems to be the preferred approach at the moment. It's the only safe way to ensure quality I don't think it is as black and white as that. These tools have their place and I think the Tomcat project has used them appropriately. FindBugs, for example, still reports 1000s of issues but the actual problems were fixed quite some time ago. The cosmetic issues were not. There is a valid argument that fixing the cosmetic issues does more harm than good by making it harder to do diffs between major versions. and to avoid useless style discussions. I don't recall any useless style discussions. I don't think this is an issue we need to solve. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47692] Can not compile mod_jk with apache2.0.63 and tomcat-connectors-1.2.28
https://issues.apache.org/bugzilla/show_bug.cgi?id=47692 --- Comment #6 from Rainer Jung 2010-07-05 06:19:34 EDT --- (In reply to comment #5) > Hi , I am a newbee on AIX...I found this article after hard googling. > I think my trouble is somewhat related so I want to hear your advices.. > I want apache-tomcat server on AIX 6.1 not sure, whether you want to build - Apache Tomcat - Apache Web Server (aka httpd) - Apache Tomcat Connectors (aka mod_jk) > I tried make after configuring > > some minutes later there is error like this. > > libtool: compile: unable to infer tagged configuration > libtool: compile: specify a tag with `--tag' > make[3]: *** [maketables.lo] Error 1 > make[3]: Leaving directory `/app/ci/ppsl/download/httpd-2.2.13/srclib/pcre' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/app/ci/ppsl/download/httpd-2.2.13/srclib/pcre' > make[1]: *** [all-recursive] Error 1 > > I can't find any answer on the whole internet sites.. > > help me please...thanks You are trying to use another compiler than the one that was used when libtool was produced. This looks like your are trying to build the Apache Web Server. Please open a discussion at the httpd users mailing list. Bugzilla is not a support from. Regards, Rainer -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49550] New: [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace
https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Summary: [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace Product: Tomcat 7 Version: 7.0.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org Created an attachment (id=25703) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25703) fix isSpace (deprecated) => isWhiteSpace As the subject says -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49551] New: When setting absolute path to default context.xml, in ContextConfig.contextConfig() it cannot be found
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551 Summary: When setting absolute path to default context.xml, in ContextConfig.contextConfig() it cannot be found Product: Tomcat 6 Version: 6.0.26 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: violet...@apache.org Hi, I'm using an Embedded Tomcat. I want to use the Tomcat's functionality - default context.xml. I'm extending the org.apache.catalina.startup.ContextConfig. Sometimes the default context.xml is outside of the "base" directory, because of this I'm using the following method to set the location - in the java doc it is stated that an absolute path is acceptable for method parameter. http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_26/java/org/apache/catalina/startup/ContextConfig.java 218/** 219 * Set the location of the default context file 220 * 221 * @param path Absolute/relative path to the default context.xml 222 */ 223public void setDefaultContextXml(String path) { 224 225this.defaultContextXml = path; 226 227} When ContextConfig.contextConfig() method is invoked, a wrong path is generated for the default context.xml i.e. If the base directory is d:/base-dir and the path to the default context.xml is d:/other-dir/configuration/context.xml the following is generated: d:/base-dir/d:/other-dir/configuration/context.xml This happens in ContextConfig.java: 715/** 716 * Process the default configuration file, if it exists. 717 */ 718protected void contextConfig() { ... 728processContextConfig(new File(getBaseDir()), defaultContextXml); ... 734} 737/** 738 * Process a context.xml. 739 */ 740protected void processContextConfig(File baseDir, String resourceName) { ... 749File file = baseDir; 750if (resourceName != null) { 751file = new File(baseDir, resourceName); 752} ... 819} Could you please clarify whether it is possible to use this setter method with absolute paths? Thanks in advance Regards -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49550] [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace
https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Mark Thomas 2010-07-05 08:24:41 EDT --- Check the archives. This has come up before. isSpace() has the behaviour required, isWhiteSpace() does not. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49550] [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace
https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Sebb changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Comment #2 from Sebb 2010-07-05 09:10:16 EDT --- In that case, may I suggest the following patch to document this for future maintainers? -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49550] [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace
https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Sebb changed: What|Removed |Added Attachment #25703|0 |1 is obsolete|| --- Comment #3 from Sebb 2010-07-05 09:11:09 EDT --- Created an attachment (id=25704) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25704) Document why still using deprecated method -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 Pieter Libin changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #7 from Pieter Libin 2010-07-05 09:06:05 EDT --- (In reply to comment #6) > (In reply to comment #4) > > I have reverted the original fix and applied a new fix that fixes the issue > > described here and still passes the Servlet TCK. > > Thanks for the quick fix! I'll give it a try. Dear All, when I run the test case on the latest version of the tomcat trunk, I get the following output, which looks like the Runnable we try to start is never executed: Start async() Dispatching start() request.isAsyncStarted()1true Returning from doGet() -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49428] Fix WebDAV mounts from Windows Mini-Redirector clients
https://issues.apache.org/bugzilla/show_bug.cgi?id=49428 --- Comment #3 from Panagiotis Astithas 2010-07-05 11:13:54 EDT --- (In reply to comment #2) > Please run the litmus test suite with your patch. Whilst the current > implementation has some failures (and patches for those would be welcome too) > the current patch for this issue causes additional failures. > > I have taken a quick look at what is going on with tcpmon from the Apache Axis > project and it looks like xmlns:D="DAV:" is being added in some circumstances > without D: then being added to some (all?) elements. > > I'd be happy to apply this patch once it does not add to the number of litmus > failures. I did run the litmus tests before submitting the patch and AFAIR there were no regressions. Do you have a list of the tests that fail with the patch? -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49428] Fix WebDAV mounts from Windows Mini-Redirector clients
https://issues.apache.org/bugzilla/show_bug.cgi?id=49428 --- Comment #4 from Mark Thomas 2010-07-05 12:27:53 EDT --- The additional failures were in the lock tests. Test 6 failed first and that triggered multiple additional failures. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 --- Comment #8 from Mark Thomas 2010-07-05 12:48:17 EDT --- Yep. The test only looked at the correctness of the return values present, it didn't check all the expected return values were present. I have fixed the test case and am looking at the additional changes required now. Should be quite quick. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[g...@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-taglibs-standard has an issue affecting its community integration. This issue affects 45 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-jelly : Commons Jelly - commons-jelly-tags-ant : Commons Jelly - commons-jelly-tags-ant-test : Commons Jelly - commons-jelly-tags-antlr : Commons Jelly - commons-jelly-tags-avalon : Commons Jelly - commons-jelly-tags-bean : Commons Jelly - commons-jelly-tags-beanshell : Commons Jelly - commons-jelly-tags-betwixt : Commons Jelly - commons-jelly-tags-bsf : Commons Jelly - commons-jelly-tags-define : Commons Jelly - commons-jelly-tags-define-test : Commons Jelly - commons-jelly-tags-dynabean : Commons Jelly - commons-jelly-tags-email : Commons Jelly - commons-jelly-tags-fmt : Commons Jelly - commons-jelly-tags-fmt-test : Commons Jelly - commons-jelly-tags-html : Commons Jelly - commons-jelly-tags-http : Commons Jelly - commons-jelly-tags-interaction : Commons Jelly - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jface : Commons Jelly - commons-jelly-tags-jms : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-jsl : Commons Jelly - commons-jelly-tags-jsl-test : Commons Jelly - commons-jelly-tags-junit : Commons Jelly - commons-jelly-tags-log : Commons Jelly - commons-jelly-tags-memory : Commons Jelly - commons-jelly-tags-quartz : Commons Jelly - commons-jelly-tags-regexp : Commons Jelly - commons-jelly-tags-soap : Commons Jelly - commons-jelly-tags-sql : Commons Jelly - commons-jelly-tags-swing : Commons Jelly - commons-jelly-tags-swt : Commons Jelly - commons-jelly-tags-threads : Commons Jelly - commons-jelly-tags-util : Commons Jelly - commons-jelly-tags-validate : Commons Jelly - commons-jelly-tags-velocity : Commons Jelly - commons-jelly-tags-xml : Commons Jelly - commons-jelly-tags-xml-test : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - commons-jelly-test : Commons Jelly - maven : Project Management Tools - maven-bootstrap : Project Management Tools - tomcat-taglibs-standard : Standard Taglib - tomcat-taglibs-standard-test : JSP Taglibs Full details are available at: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- (Gump generated) Maven2 Settings in: /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml -INFO- Failed with reason build failed -DEBUG- Maven POM in: /srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build) Work ended in a state of : Failed Elapsed: 2 mins 1 sec Command Line: mvn --batch-mode -DskipTests=true --settings /srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml install [Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard] CLASSPATH: /usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/pom.xml:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar - at org.apache.cactus.maven2.mojos.CactifyWarMojo.getOriginalWebXml(CactifyWarMojo.java:648) at org.apache.cactus.maven2.mojos.CactifyWarMojo.execute(CactifyWarMojo.java:277) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecu
DO NOT REPLY [Bug 49554] New: Clean up Functions
https://issues.apache.org/bugzilla/show_bug.cgi?id=49554 Summary: Clean up Functions Product: Taglibs Version: 1.2.0 Platform: PC Status: NEW Severity: enhancement Priority: P2 Component: Standard Taglib AssignedTo: dev@tomcat.apache.org ReportedBy: jboy...@apache.org The implementation of Functions has checks for null parameters that are redundant given coercion required by the Engine. As discussed on the mailing list, these checks can be removed. Functions should have JavaDoc. Some function implementations, such as replace, are now available in the JRE allowing this class to be simplified. Also usage of StringBuffer can be replaced with StringBuilder avoiding unneeded synchronization. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49554] Clean up Functions
https://issues.apache.org/bugzilla/show_bug.cgi?id=49554 --- Comment #1 from Jeremy Boynes 2010-07-05 16:01:53 EDT --- Created an attachment (id=25711) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25711) Patch to clean up Functions pom.xml also includes changes from attachment 25694 for SetSupport -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960692 - in /tomcat/trunk: java/org/apache/catalina/connector/Request.java java/org/apache/catalina/core/AsyncContextImpl.java test/org/apache/catalina/core/TestAsyncContextImpl.java
Author: markt Date: Mon Jul 5 20:51:21 2010 New Revision: 960692 URL: http://svn.apache.org/viewvc?rev=960692&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 Previous fix was incomplete. Improve test case and fix TCK and test cases pass with this patch Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.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=960692&r1=960691&r2=960692&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Mon Jul 5 20:51:21 2010 @@ -1578,6 +1578,7 @@ public class Request } return (asyncContext.getState()==AsyncContextImpl.AsyncState.DISPATCHING || + asyncContext.getState()==AsyncContextImpl.AsyncState.DISPATCHING_RUNNABLE || asyncContext.getState()==AsyncContextImpl.AsyncState.TIMING_OUT || asyncContext.getState()==AsyncContextImpl.AsyncState.STARTED || asyncContext.getState()==AsyncContextImpl.AsyncState.ERROR_DISPATCHING || Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=960692&r1=960691&r2=960692&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Mon Jul 5 20:51:21 2010 @@ -48,8 +48,8 @@ import org.apache.juli.logging.LogFactor public class AsyncContextImpl implements AsyncContext { public static enum AsyncState { -NOT_STARTED, STARTED, DISPATCHING, DISPATCHING_INTERNAL, DISPATCHED, -COMPLETING, TIMING_OUT, ERROR_DISPATCHING +NOT_STARTED, STARTED, DISPATCHING, DISPATCHING_RUNNABLE, DISPATCHED, +COMPLETING, COMPLETING_RUNNABLE, TIMING_OUT, ERROR_DISPATCHING } private static final Log log = LogFactory.getLog(AsyncContextImpl.class); @@ -87,6 +87,9 @@ public class AsyncContextImpl implements AtomicBoolean dispatched = new AtomicBoolean(false); request.getCoyoteRequest().action(ActionCode.ACTION_ASYNC_COMPLETE,dispatched); if (!dispatched.get()) doInternalComplete(false); +} else if (state.compareAndSet(AsyncState.DISPATCHING_RUNNABLE, +AsyncState.COMPLETING_RUNNABLE)) { +// do nothing } else { throw new IllegalStateException("Complete not allowed. Invalid state:"+state.get()); } @@ -179,8 +182,8 @@ public class AsyncContextImpl implements log.debug("AsyncContext Start Called["+state.get()+"; "+request.getRequestURI()+"?"+request.getQueryString()+"]", new DebugException()); } -if (state.compareAndSet(AsyncState.STARTED, AsyncState.DISPATCHING_INTERNAL) || -state.compareAndSet(AsyncState.DISPATCHED, AsyncState.DISPATCHING_INTERNAL)) { +if (state.compareAndSet(AsyncState.STARTED, AsyncState.DISPATCHING_RUNNABLE) || +state.compareAndSet(AsyncState.DISPATCHED, AsyncState.DISPATCHING_RUNNABLE)) { // TODO SERVLET3 - async final ServletContext sctx = getServletRequest().getServletContext(); Runnable r = new Runnable() { @@ -254,7 +257,9 @@ public class AsyncContextImpl implements } public boolean isStarted() { -return (state.get() == AsyncState.STARTED || state.get() == AsyncState.DISPATCHING); +return (state.get() == AsyncState.STARTED || +state.get() == AsyncState.DISPATCHING || +state.get() == AsyncState.DISPATCHING_RUNNABLE); } public void setStarted(Context context) { @@ -334,7 +339,7 @@ public class AsyncContextImpl implements dispatch = null; } } -} else if (this.state.get() == AsyncState.DISPATCHING_INTERNAL) { +} else if (this.state.get() == AsyncState.DISPATCHING_RUNNABLE) { if (this.dispatch!=null) { try { dispatch.run(); @@ -345,7 +350,14 @@ public class AsyncContextImpl implements else throw new ServletException(x); } finally { dispatch = null; -this.state.set(AsyncState.DISPATCHED); +} +if (this.state.compareAndSet(AsyncState.COMPLETING_RUNNABLE, +AsyncState.COMPLETING)) { +
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #9 from Mark Thomas 2010-07-05 16:51:52 EDT --- Sorry about that. Fixed in trunk. Will be in 7.0.1 onwards. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960698 - in /tomcat/trunk: java/org/apache/catalina/connector/Response.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 5 20:58:23 2010 New Revision: 960698 URL: http://svn.apache.org/viewvc?rev=960698&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Trivial code clean up Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=960698&r1=960697&r2=960698&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Mon Jul 5 20:58:23 2010 @@ -746,6 +746,7 @@ public class Response * * @param type The new content type */ +@SuppressWarnings("deprecation") // isSpace (deprecated) cannot be replaced by isWhiteSpace public void setContentType(String type) { if (isCommitted()) @@ -773,6 +774,7 @@ public class Response if (index != -1) { int len = type.length(); index++; +// N.B. isSpace (deprecated) cannot be replaced by isWhiteSpace while (index < len && Character.isSpace(type.charAt(index))) { index++; } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=960698&r1=960697&r2=960698&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 5 20:58:23 2010 @@ -103,6 +103,11 @@ Additional debug logging in StandardContext to provide information on Manager selection. (markt) + +49550: Supress deprecation warning where deprecated code is +required to be used. No functional change. Patch provided by Sebb. +(markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49550] [PATCH] Response class fix isSpace (deprecated) => isWhiteSpace
https://issues.apache.org/bugzilla/show_bug.cgi?id=49550 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #4 from Mark Thomas 2010-07-05 16:59:14 EDT --- Fixed in trunk. Will be in 7.0.1 onwards. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960701 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 5 21:07:32 2010 New Revision: 960701 URL: http://svn.apache.org/viewvc?rev=960701&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49551 Allow default context.xml file to be specified using an absolute path. Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=960701&r1=960700&r2=960701&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Jul 5 21:07:32 2010 @@ -537,7 +537,7 @@ public class ContextConfig */ protected void contextConfig() { -// Open the default web.xml file, if it exists +// Open the default context.xml file, if it exists if( defaultContextXml==null && context instanceof StandardContext ) { defaultContextXml = ((StandardContext)context).getDefaultContextXml(); } @@ -545,7 +545,10 @@ public class ContextConfig if( defaultContextXml==null ) getDefaultContextXml(); if (!context.getOverride()) { -File defaultContextFile = new File(getBaseDir(), defaultContextXml); +File defaultContextFile = new File(defaultContextXml); +if (!defaultContextFile.isAbsolute()) { +defaultContextFile =new File(getBaseDir(), defaultContextXml); +} if (defaultContextFile.exists()) { try { URL defaultContextUrl = defaultContextFile.toURI().toURL(); Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=960701&r1=960700&r2=960701&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 5 21:07:32 2010 @@ -108,6 +108,10 @@ required to be used. No functional change. Patch provided by Sebb. (markt) + +49551: Allow default context.xml location to be specified +using an absolute path. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960702 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Mon Jul 5 21:09:25 2010 New Revision: 960702 URL: http://svn.apache.org/viewvc?rev=960702&view=rev Log: Proposal 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=960702&r1=960701&r2=960702&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 5 21:09:25 2010 @@ -150,3 +150,9 @@ PATCHES PROPOSED TO BACKPORT: http://svn.apache.org/viewvc?rev=958615&view=rev +1: kkolinko, rjung, kfujino, pero -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49551 + Allow default context.xml file to be specified using an absolute path + http://svn.apache.org/viewvc?rev=960701&view=rev + +1: markt + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49551] When setting absolute path to default context.xml, in ContextConfig.contextConfig() it cannot be found
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551 --- Comment #1 from Mark Thomas 2010-07-05 17:10:22 EDT --- Thanks for the bug report. I have fixed in this in 7.0.x (it will be in 7.0.1 onwards) and proposed the fix 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49528] HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528 --- Comment #10 from Pieter Libin 2010-07-05 17:15:08 EDT --- (In reply to comment #9) > Sorry about that. Fixed in trunk. Will be in 7.0.1 onwards. Thanks a lot for the quick response! I'll retest from the trunk tomorrow morning. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960711 - in /tomcat/trunk/test/org/apache/el/parser: TestELParser.java TesterBeanA.java
Author: markt Date: Mon Jul 5 21:44:29 2010 New Revision: 960711 URL: http://svn.apache.org/viewvc?rev=960711&view=rev Log: Test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=49217 Added: tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java (with props) Modified: tomcat/trunk/test/org/apache/el/parser/TestELParser.java Modified: tomcat/trunk/test/org/apache/el/parser/TestELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/parser/TestELParser.java?rev=960711&r1=960710&r2=960711&view=diff == --- tomcat/trunk/test/org/apache/el/parser/TestELParser.java (original) +++ tomcat/trunk/test/org/apache/el/parser/TestELParser.java Mon Jul 5 21:44:29 2010 @@ -18,6 +18,7 @@ package org.apache.el.parser; import javax.el.ELContext; +import javax.el.ELException; import javax.el.ExpressionFactory; import javax.el.ValueExpression; @@ -53,7 +54,49 @@ public class TestELParser extends TestCa testExpression("#$#{1+1}", "#$2"); testExpression("$#{1+1}", "$2"); testExpression("$#${1+1}", "$#2"); -} +} + +public void testJavaKeyWordSuffix() { +ExpressionFactory factory = ExpressionFactory.newInstance(); +ELContext context = new ELContextImpl(); + +TesterBeanA beanA = new TesterBeanA(); +beanA.setInt("five"); +ValueExpression var = +factory.createValueExpression(beanA, TesterBeanA.class); +context.getVariableMapper().setVariable("beanA", var); + +// Should fail +Exception e = null; +try { +factory.createValueExpression(context, "${beanA.int}", +String.class); +} catch (ELException ele) { +e = ele; +} +assertNotNull(e); +} + +public void testJavaKeyWordIdentifier() { +ExpressionFactory factory = ExpressionFactory.newInstance(); +ELContext context = new ELContextImpl(); + +TesterBeanA beanA = new TesterBeanA(); +beanA.setInt("five"); +ValueExpression var = +factory.createValueExpression(beanA, TesterBeanA.class); +context.getVariableMapper().setVariable("this", var); + +// Should fail +Exception e = null; +try { +factory.createValueExpression(context, "${this}", String.class); +} catch (ELException ele) { +e = ele; +} +assertNotNull(e); +} + private void testExpression(String expression, String expected) { ExpressionFactory factory = ExpressionFactory.newInstance(); Added: tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java?rev=960711&view=auto == --- tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java (added) +++ tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java Mon Jul 5 21:44:29 2010 @@ -0,0 +1,30 @@ +/* + * 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.el.parser; + +public class TesterBeanA { +private String keywordInt; + +public String getInt() { +return keywordInt; +} + +public void setInt(String keywordInt) { +this.keywordInt = keywordInt; +} +} Propchange: tomcat/trunk/test/org/apache/el/parser/TesterBeanA.java -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960712 - in /tomcat/trunk: java/org/apache/el/parser/AstDotSuffix.java java/org/apache/el/parser/AstIdentifier.java java/org/apache/el/util/Validation.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 5 21:45:26 2010 New Revision: 960712 URL: http://svn.apache.org/viewvc?rev=960712&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49217 Prevent use of Java keywords in identifiers Added: tomcat/trunk/java/org/apache/el/util/Validation.java (with props) Modified: tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java?rev=960712&r1=960711&r2=960712&view=diff == --- tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java (original) +++ tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java Mon Jul 5 21:45:26 2010 @@ -21,6 +21,7 @@ package org.apache.el.parser; import javax.el.ELException; import org.apache.el.lang.EvaluationContext; +import org.apache.el.util.Validation; /** @@ -37,4 +38,12 @@ public final class AstDotSuffix extends throws ELException { return this.image; } + +@Override +public void setImage(String image) { +if (Validation.isJavaKeyword(image)) { +throw new ELException("Can't use Java keyword as identifier"); +} +this.image = image; +} } Modified: tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java?rev=960712&r1=960711&r2=960712&view=diff == --- tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java (original) +++ tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java Mon Jul 5 21:45:26 2010 @@ -28,6 +28,7 @@ import javax.el.VariableMapper; import org.apache.el.lang.EvaluationContext; import org.apache.el.util.MessageFactory; +import org.apache.el.util.Validation; /** @@ -125,6 +126,14 @@ public final class AstIdentifier extends return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext()); } +@Override +public void setImage(String image) { +if (Validation.isJavaKeyword(image)) { +throw new ELException("Can't use Java keyword as identifier"); +} +this.image = image; +} + private final MethodExpression getMethodExpression(EvaluationContext ctx) throws ELException { Object obj = null; Added: tomcat/trunk/java/org/apache/el/util/Validation.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/util/Validation.java?rev=960712&view=auto == --- tomcat/trunk/java/org/apache/el/util/Validation.java (added) +++ tomcat/trunk/java/org/apache/el/util/Validation.java Mon Jul 5 21:45:26 2010 @@ -0,0 +1,57 @@ +/* + * 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.el.util; + +public class Validation { + +private static final String javaKeywords[] = { "abstract", "assert", +"boolean", "break", "byte", "case", "catch", "char", "class", +"const", "continue", "default", "do", "double", "else", "enum", +"extends", "final", "finally", "float", "for", "goto", "if", +"implements", "import", "instanceof", "int", "interface", "long", +"native", "new", "package", "private", "protected", "public", +"return", "short", "static", "strictfp", "super", "switch", +"synchronized", "this", "throw", "throws", "transient", "try", +"void", "volatile", "while" }; + + +private Validation() { +// Utility class. Hide default constructor +} + +/** + * Test whether the argument is a Java keyword + */ +public static boolean isJavaKeyword(String key) { +int i = 0; +int j = javaKeywords.length; +while (i < j) { +int k = (i + j) / 2; +int result = javaKeywords[k].compareTo(key); +if (result == 0) { +return true; +
svn commit: r960713 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Mon Jul 5 21:46:31 2010 New Revision: 960713 URL: http://svn.apache.org/viewvc?rev=960713&view=rev Log: Proposal 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=960713&r1=960712&r2=960713&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 5 21:46:31 2010 @@ -156,3 +156,9 @@ PATCHES PROPOSED TO BACKPORT: http://svn.apache.org/viewvc?rev=960701&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49217 + Prevent use of Java keywords in EL identifiers + http://svn.apache.org/viewvc?rev=960711&view=rev + +1: markt + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49217] Accepting java keyword in EL
https://issues.apache.org/bugzilla/show_bug.cgi?id=49217 --- Comment #2 from Mark Thomas 2010-07-05 17:47:39 EDT --- Thanks for the report. This has been fixed in 7.0.x and will be in 7.0.1 onwards. It has also been 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 28756] Cannot filter requests when running behind a front-end
https://issues.apache.org/bugzilla/show_bug.cgi?id=28756 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #4 from Mark Thomas 2010-07-05 17:57:33 EDT --- ServerName and ServerPort do not make suitable candidates for request filtering since the user agent is able to control these values. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 25738] org.apache.jasper.JspC has no command switch to disable tag pooling
https://issues.apache.org/bugzilla/show_bug.cgi?id=25738 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Mark Thomas 2010-07-05 18:01:24 EDT --- This wasn't fixed in 4.1.x but it has been fixed in 5.5.x, 6.0.x and 7.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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49555] New: Custom Taglibs should support all parameters
https://issues.apache.org/bugzilla/show_bug.cgi?id=49555 Summary: Custom Taglibs should support all parameters Product: Tomcat 7 Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: Jasper AssignedTo: dev@tomcat.apache.org ReportedBy: james_cal...@yahoo.com I added two method s with the same name but with an addition parameters. I get this error: org.apache.jasper.JasperException: Duplicate function name list in tag library /WEB-INF/dataStore.tld Crap! It is not even looking at the parameters. Ok, Java matches on method names and method parameters. It is commonly called a method signature. Well, Jasper is in the Google SDK, so it could perhaps be smarter than I am -- so maybe I overlooked something. Is that the case? Why can't the Jasper compiler match on parameters like Java? This is after all Java. I'm only using TLDs because they are cleaner then escaping Java code in JSP. I have already wrote a considerable amount of TLD code and it does not easily mix with the expression language. This is the reason why it is so important to have this implementation work as expected. Please let me know how I can help. Lets get this fixed. -Jimmy AppEngine SDK 1.3.2 (sorry, I don't know the embedded Jasper version) -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49555] Custom Taglibs should support all parameters
https://issues.apache.org/bugzilla/show_bug.cgi?id=49555 --- Comment #1 from james_cal...@yahoo.com 2010-07-05 18:30:00 EDT --- I have an architecture that uses static inner classes. After about an hour of trial and error and internet searches, I discovered that I can not use a Static inner class as a method parameters in my TDL file. This is the error: org.apache.jasper.JasperException: /WEB-INF/jsp/page.jsp(19,2) The function listElement cannot be located with the specified prefix No, it is there. It can't find the parameter: com.example.MyClass.MyInnerStaticClass It simply can not find my method. I know I have it correct because I can replace the static inner class parameter with a top-level class (MyClass). I can then call my static function. The more important part of my program relies on static inner classes. There are a number of them. I did this by design to represent a simple structure that is best coded in a single file. I'm not changing this part of the program. Unfortunately, escaping Java code in JSP pages does not mix well with JSP expression language. Also, I have a decent amount of expression language code. So, I really need the jasper compiler have basic support for Java constructs. Can you help please? I'm using the Google AppEngine SDK 1.3.2. I'm sorry, I do not see the Jasper version. I only see the apache jasper package name in my exception. Please let me know if I can help. Thank, Jimmy -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49556] New: the proc.create function used args as env to get the element count,
https://issues.apache.org/bugzilla/show_bug.cgi?id=49556 Summary: the proc.create function used args as env to get the element count, Product: Tomcat Native Version: 1.1.19 Platform: PC OS/Version: Windows XP Status: NEW Severity: critical Priority: P2 Component: Library AssignedTo: dev@tomcat.apache.org ReportedBy: lanyufly...@gmail.com if (env) es = (*e)->GetArrayLength(e, args); this would cause nullpoint exception like this: java.lang.NullPointerException at org.apache.tomcat.jni.Proc.create(Native Method) at hyer.process.Controller.main(Controller.java:91) -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49557] New: index erro in the loop to get the env info in the proc.create function
https://issues.apache.org/bugzilla/show_bug.cgi?id=49557 Summary: index erro in the loop to get the env info in the proc.create function Product: Tomcat Native Version: 1.1.19 Platform: PC OS/Version: Windows XP Status: NEW Severity: critical Priority: P2 Component: Library AssignedTo: dev@tomcat.apache.org ReportedBy: lanyufly...@gmail.com line 232:s_env[i+1] = tcn_get_string(e, str); this will crash the java vm for a violate access error. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49555] Custom Taglibs should support all parameters
https://issues.apache.org/bugzilla/show_bug.cgi?id=49555 --- Comment #2 from Mark Thomas 2010-07-06 01:28:32 EDT --- It is likely to be Tomcat 6 that is being used rather than Tomcat 7 but any fix in Tomcat 7 will get back-ported to Tomcat 6 so lets not worry too much about that. I think I understand the problem you are seeing but it would help if you could attach the source for the simplest possible test case that demonstrates the issue (I'd expect 1*JSP, 1*TLD, 1*Java class & 1* web.xml) I do wonder if this is an issue between com.example.MyClass.MyInnerStaticClass and com.example.MyClass$MyInnerStaticClass? There was a similar issue (bug 35351) some time ago. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960812 - /tomcat/taglibs/standard/trunk/impl/pom.xml
Author: bayard Date: Tue Jul 6 06:32:09 2010 New Revision: 960812 URL: http://svn.apache.org/viewvc?rev=960812&view=rev Log: Adding pom changes from #49548. Hook the new TestSetSupport file up directly, and ensure the jar includes the .properties file. Patch from Jeremy Boynes Modified: tomcat/taglibs/standard/trunk/impl/pom.xml Modified: tomcat/taglibs/standard/trunk/impl/pom.xml URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/pom.xml?rev=960812&r1=960811&r2=960812&view=diff == --- tomcat/taglibs/standard/trunk/impl/pom.xml (original) +++ tomcat/taglibs/standard/trunk/impl/pom.xml Tue Jul 6 06:32:09 2010 @@ -120,6 +120,14 @@ + + + src/main/java + + **/*.properties + + + org.apache.maven.plugins @@ -137,7 +145,7 @@ org/apache/taglibs/standard/lang/jstl/test/StaticFunctionTests.java org/apache/taglibs/standard/TestVersion.java -org/apache/taglibs/standard/tag/**/Test*.java + org/apache/taglibs/standard/tag/common/core/TestSetSupport.java - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49548] Refactoring SetSupport
https://issues.apache.org/bugzilla/show_bug.cgi?id=49548 Henri Yandell changed: What|Removed |Added OS/Version||All --- Comment #2 from Henri Yandell 2010-07-06 02:35:45 EDT --- pom.xml changes applied (r960812). -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r960814 - in /tomcat/taglibs/standard/trunk/impl/src: main/java/org/apache/taglibs/standard/functions/Functions.java test/java/org/apache/taglibs/standard/functions/TestFunctions.java
Author: bayard Date: Tue Jul 6 06:46:55 2010 New Revision: 960814 URL: http://svn.apache.org/viewvc?rev=960814&view=rev Log: Patch from Jeremy Boynes (#49554): "The implementation of Functions has checks for null parameters that are redundant given coercion required by the Engine. As discussed on the mailing list, these checks can be removed. Functions should have JavaDoc. Some function implementations, such as replace, are now available in the JRE allowing this class to be simplified. Also usage of StringBuffer can be replaced with StringBuilder avoiding unneeded synchronization." Added: tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java (with props) Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/functions/Functions.java Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/functions/Functions.java URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/functions/Functions.java?rev=960814&r1=960813&r2=960814&view=diff == --- tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/functions/Functions.java (original) +++ tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/functions/Functions.java Tue Jul 6 06:46:55 2010 @@ -30,7 +30,13 @@ import org.apache.taglibs.standard.resou import org.apache.taglibs.standard.tag.common.core.Util; /** - * JSTL Functions + * Static functions that extend the Expression Language with standardized behaviour + * commonly used by page authors. + * + * Implementation Note: When passing a String parameter, section + * 1.18.2 of the EL specification requires the container to coerce a null value to an + * empty string. These implementation assume such behaviour and do not check for null + * parameters. Passing a null will generally trigger a NullPointerException. * * @author Pierre Delisle */ @@ -41,14 +47,22 @@ public class Functions { // String capitalization /** - * Converts all of the characters of the input string to upper case. + * Converts all of the characters of the input string to upper case according to the + * semantics of method String#toUpperCase(). + * + * @param input the input string on which the transformation to upper case is applied + * @return the input string transformed to upper case */ public static String toUpperCase(String input) { return input.toUpperCase(); } /** - * Converts all of the characters of the input string to lower case. + * Converts all of the characters of the input string to lower case according to the + * semantics of method String#toLowerCase(). + * + * @param input the input string on which the transformation to lower case is applied + * @return the input string transformed to lower case */ public static String toLowerCase(String input) { return input.toLowerCase(); @@ -56,52 +70,105 @@ public class Functions { //* // Substring processing - + +/** + * Returns the index (0-based) withing a string of the first occurrence of a specified + * substring according to the semantics of the method String#indexOf(). + * + * If substring is empty, this matches the beginning of the string and the + * value returned is 0. + * + * @param input the input string on which the function is applied + * @param substring the substring to search for in the input string + * @return the 0-based index of the first matching substring, or -1 if it does not occur + */ public static int indexOf(String input, String substring) { -if (input == null) input = ""; -if (substring == null) substring = ""; return input.indexOf(substring); -} +} +/** + * Tests if a string contains the specified substring. + * + * @param input the input string on which the function is applied + * @param substring the substring tested for + * @return true if the character sequence represented by the substring + * exists in the string + */ public static boolean contains(String input, String substring) { -return indexOf(input, substring) != -1; +return input.contains(substring); } +/** + * Tests if a string contains the specified substring in a case insensitive way. + * Equivalent to fn:contains(fn:toUpperCase(string), fn:toUpperCase(substring)). + * + * @param input the input string on which the function is applied + * @param substring the substring tested for + * @return true if the character sequence represented by the substring + * exists in the string +
svn commit: r960817 - in /tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard: resources/Resources.properties tag/common/core/SetSupport.java
Author: bayard Date: Tue Jul 6 06:52:21 2010 New Revision: 960817 URL: http://svn.apache.org/viewvc?rev=960817&view=rev Log: Applying Jeremy Boynes' refactoring of SetSupport per #49548 "Patch primarily refactors the large "if" clause that sets the result into smaller methods. It also clears up IDE warnings (at least from IDEA). One side effect was I18N of the exception message for "SET_BAD_DEFERRED_SCOPE" I18N also needed access to the original value (which was not being retained) and in conjunction with that I replaced the "scopeSpecified" indicator with a check on whether the "scope" attribute is null. I also changed the comment where the exception is thrown when target is null. This can happen as target is a request-time attribute and the spec does define this behaviour. When setting a bean property, the for loop now exits after setting its property rather than continuing to iterate through all of them. This should have no impact unless a bean can have two PropertyDescriptors with the same name and I don't believe it can. Finally, all throws of JspException were replaced with JspTagException as these are errors coming from a Tag Handler rather than the JSP Engine itself." Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties?rev=960817&r1=960816&r2=960817&view=diff == --- tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties (original) +++ tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties Tue Jul 6 06:52:21 2010 @@ -77,6 +77,9 @@ SET_INVALID_PROPERTY=\ SET_INVALID_TARGET=\ Attempt to set the property of an invalid object in. +SET_BAD_DEFERRED_SCOPE=\ +Invalid scope for ValueExpression in . "page" scope is required but was "{0}" + SET_NO_VALUE=\ Need either non-whitespace body or "value" attribute in Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java?rev=960817&r1=960816&r2=960817&view=diff == --- tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java (original) +++ tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java Tue Jul 6 06:52:21 2010 @@ -61,8 +61,7 @@ public class SetSupport extends BodyTagS protected Object target;// tag attribute protected String property; // tag attribute private String var; // tag attribute -private int scope; // tag attribute -private boolean scopeSpecified; // status +private String scope; // tag attribute //* // Construction and initialization @@ -79,9 +78,8 @@ public class SetSupport extends BodyTagS // resets local state private void init() { -value = target = property = var = null; -scopeSpecified = valueSpecified = false; -scope = PageContext.PAGE_SCOPE; +value = target = property = var = scope = null; +valueSpecified = false; } // Releases any resources we may have (or inherit) @@ -101,92 +99,19 @@ public class SetSupport extends BodyTagS // decide what to do with the result if (var != null) { - -/* - * Store the result, letting an IllegalArgumentException - * propagate back if the scope is invalid (e.g., if an attempt - * is made to store something in the session without any - * HttpSession existing). - */ -ELContext myELContext = pageContext.getELContext(); -VariableMapper vm = myELContext.getVariableMapper(); -if (result != null) { -//check for instanceof valueExpression -if (result instanceof ValueExpression) { -if (scope!=PageContext.PAGE_SCOPE) { -throw new JspException("Incorrect scope for ValueExpression. PageScope is required."); -} -//set variable in var Mapper -vm.setVariable(var, (Valu
DO NOT REPLY [Bug 49548] Refactoring SetSupport
https://issues.apache.org/bugzilla/show_bug.cgi?id=49548 Henri Yandell changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #3 from Henri Yandell 2010-07-06 02:54:53 EDT --- SetSupport and .properties changes also committed (r960817). On the tests - what are Syntax1 and Syntax3? -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49554] Clean up Functions
https://issues.apache.org/bugzilla/show_bug.cgi?id=49554 Henri Yandell changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED OS/Version||All --- Comment #2 from Henri Yandell 2010-07-06 02:47:41 EDT --- I was a bit concerned about substring's: -if (beginIndex >= input.length()) return ""; and substringAfter's: -if (substring.length() == 0) return input; However you have unit tests for both and they pass before the Functions.java change is applied and afterwards. Committed as r960814. -- 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org