DO NOT REPLY [Bug 48458] Deployment is not happening
https://issues.apache.org/bugzilla/show_bug.cgi?id=48458 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Mark Thomas 2009-12-30 00:23:14 GMT --- Bugzilla is not a support forum. Please use the users mailing list. -- 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 48458] Deployment is not happening
https://issues.apache.org/bugzilla/show_bug.cgi?id=48458 Sunoob Krish <4me.sun...@gmail.com> changed: What|Removed |Added Status|RESOLVED|CLOSED Resolution|INVALID |FIXED -- 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: r894572 - /tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
Author: markt Date: Wed Dec 30 09:24:17 2009 New Revision: 894572 URL: http://svn.apache.org/viewvc?rev=894572&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48443 Correct FileNotFoundException on ROOT context start when annotation scanning is enabled Patch provided by wujunchen Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=894572&r1=894571&r2=894572&view=diff == --- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Wed Dec 30 09:24:17 2009 @@ -426,9 +426,17 @@ if (collection != null) { try { String file = getURL().getFile(); -// This will be of the form file name +// if is not empty otherwise this will be of the +// form //file name // Strip off the hostname and the contextpath -int start = file.indexOf('/', file.indexOf('/', 1) + 1); +int start; +if(context instanceof ProxyDirContext && + "".equals(((ProxyDirContext)context).getContextName())){ +start = file.indexOf('/',1); +} +else +start = file.indexOf('/', file.indexOf('/', 1) + 1); NamingEnumeration enumeration = context.list(file.substring(start)); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48443] when the context path is empty,tomcat will startup with a FileNotFoundException
https://issues.apache.org/bugzilla/show_bug.cgi?id=48443 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Mark Thomas 2009-12-30 01:24:44 GMT --- Many thanks for the patch. It has been applied to trunk and will be included in 7.0.0 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: r894573 - /tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Wed Dec 30 09:29:19 2009 New Revision: 894573 URL: http://svn.apache.org/viewvc?rev=894573&view=rev Log: Fix some Eclipse warnings Modified: tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java Modified: tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java?rev=894573&r1=894572&r2=894573&view=diff == --- tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java Wed Dec 30 09:29:19 2009 @@ -244,6 +244,8 @@ /* some vars below copied from Craig R. McClanahan's InvokerServlet */ +private static final long serialVersionUID = 1L; + /** the debugging detail level for this servlet. */ private int debug = 0; @@ -327,7 +329,9 @@ * */ protected void printServletEnvironment(ServletOutputStream out, -HttpServletRequest req, HttpServletResponse res) throws IOException { +HttpServletRequest req, +@SuppressWarnings("unused") HttpServletResponse res) +throws IOException { // Document the properties from ServletRequest out.println("ServletRequest Properties"); @@ -867,21 +871,21 @@ } if (!currentLocation.isFile()) { return new String[] { null, null, null, null }; -} else { -if (debug >= 2) { -log("findCGI: FOUND cgi at " + currentLocation); -} -path = currentLocation.getAbsolutePath(); -name = currentLocation.getName(); +} -if (".".equals(contextPath)) { -scriptname = servletPath; -} else { -scriptname = contextPath + servletPath; -} -if (!servletPath.equals(cginame)) { -scriptname = scriptname + cginame; -} +if (debug >= 2) { +log("findCGI: FOUND cgi at " + currentLocation); +} +path = currentLocation.getAbsolutePath(); +name = currentLocation.getName(); + +if (".".equals(contextPath)) { +scriptname = servletPath; +} else { +scriptname = contextPath + servletPath; +} +if (!servletPath.equals(cginame)) { +scriptname = scriptname + cginame; } if (debug >= 1) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48458] Deployment is not happening
https://issues.apache.org/bugzilla/show_bug.cgi?id=48458 Konstantin Kolinko changed: What|Removed |Added Resolution|FIXED |INVALID -- 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: r894577 - /tomcat/trunk/conf/web.xml
Author: markt Date: Wed Dec 30 10:13:05 2009 New Revision: 894577 URL: http://svn.apache.org/viewvc?rev=894577&view=rev Log: Update to 3.0 schema Modified: tomcat/trunk/conf/web.xml Modified: tomcat/trunk/conf/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=894577&r1=894576&r2=894577&view=diff == --- tomcat/trunk/conf/web.xml (original) +++ tomcat/trunk/conf/web.xml Wed Dec 30 10:13:05 2009 @@ -16,9 +16,9 @@ limitations under the License. --> http://java.sun.com/xml/ns/javaee"; -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; -xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; -version="2.5"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; + version="3.0"> - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r894580 - in /tomcat/trunk: conf/web.xml java/org/apache/catalina/servlets/CGIServlet.java webapps/docs/cgi-howto.xml
Author: markt Date: Wed Dec 30 10:45:34 2009 New Revision: 894580 URL: http://svn.apache.org/viewvc?rev=894580&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48454 Give the stderr reader a chance to finish before terminating the CGI process. This avoids "Bad file descriptor" errors. The period to wait is configurable. Based on a patch by Markus Grieder Modified: tomcat/trunk/conf/web.xml tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/trunk/webapps/docs/cgi-howto.xml Modified: tomcat/trunk/conf/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=894580&r1=894579&r2=894580&view=diff == --- tomcat/trunk/conf/web.xml (original) +++ tomcat/trunk/conf/web.xml Wed Dec 30 10:45:34 2009 @@ -301,6 +301,10 @@ + + + +
svn commit: r894582 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Wed Dec 30 10:47:03 2009 New Revision: 894582 URL: http://svn.apache.org/viewvc?rev=894582&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=894582&r1=894581&r2=894582&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Dec 30 10:47:03 2009 @@ -102,3 +102,11 @@ http://svn.apache.org/viewvc?rev=893496&view=rev +1: kkolinko -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48454 + Give the stderr reader a chance to finish before terminating the CGI process. + This avoids "Bad file descriptor" errors. The period to wait is configurable. + Based on a patch by Markus Grieder + http://svn.apache.org/viewvc?rev=894580&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 48454] "Bad file descriptor"-IOException in CGIServlet for some programs
https://issues.apache.org/bugzilla/show_bug.cgi?id=48454 --- Comment #1 from Mark Thomas 2009-12-30 02:47:51 GMT --- Thanks for the report and the patch. I have applied the patch + a configuration option for the timeout to trunk (Tomcat 7) and proposed it 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
svn commit: r894586 - in /tomcat/trunk/java/org/apache/catalina: connector/ core/ ha/ manager/ mbeans/ realm/ session/ startup/ tribes/ util/
Author: markt Date: Wed Dec 30 11:07:22 2009 New Revision: 894586 URL: http://svn.apache.org/viewvc?rev=894586&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 Correct French trabslations Patches provided by André Warnier Added: tomcat/trunk/java/org/apache/catalina/ha/LocalStrings_fr.properties (with props) tomcat/trunk/java/org/apache/catalina/mbeans/LocalStrings_fr.properties (with props) tomcat/trunk/java/org/apache/catalina/tribes/LocalStrings_fr.properties (with props) Modified: tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/core/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/manager/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/realm/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/session/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/startup/LocalStrings_fr.properties tomcat/trunk/java/org/apache/catalina/util/LocalStrings_fr.properties Modified: tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_fr.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_fr.properties?rev=894586&r1=894585&r2=894586&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_fr.properties (original) +++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings_fr.properties Wed Dec 30 11:07:22 2009 @@ -22,7 +22,7 @@ coyoteConnector.alreadyStarted=Le connecteur a d\u00e9j\u00e0 \u00e9t\u00e9 d\u00e9marr\u00e9 coyoteConnector.cannotRegisterProtocol=Impossible d''enregistrer le MBean pour le Protocol coyoteConnector.notStarted=Le connecteur Coyote n''a pas \u00e9t\u00e9 d\u00e9marr\u00e9 -coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de protocole a \u00e9chou\u00e9e: {0} +coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de protocole a \u00e9chou\u00e9: {0} coyoteConnector.protocolHandlerInitializationFailed=L''initialisation du gestionnaire de protocole a \u00e9chou\u00e9: {0} coyoteConnector.protocolHandlerInstantiationFailed=L''instantiation du gestionnaire de protocole a \u00e9chou\u00e9: {0} coyoteConnector.protocolHandlerStartFailed=Le d\u00e9marrage du gestionnaire de protocole a \u00e9chou\u00e9: {0} @@ -53,12 +53,12 @@ coyoteRequest.getInputStream.ise="getReader()" a d\u00e9j\u00e0 \u00e9t\u00e9 appel\u00e9 pour cette requ\u00eate coyoteRequest.getReader.ise="getInputStream()" a d\u00e9j\u00e0 \u00e9t\u00e9 appel\u00e9 pour cette requ\u00eate -coyoteRequest.sessionCreateCommitted=Impossible de cr\u00e9er une sessionapr\u00e8s que la r\u00e9ponse ait \u00e9t\u00e9 envoy\u00e9e +coyoteRequest.sessionCreateCommitted=Impossible de cr\u00e9er une session apr\u00e8s que la r\u00e9ponse ait \u00e9t\u00e9 envoy\u00e9e coyoteRequest.setAttribute.namenull=Impossible d''appeler "setAttribute" avec un nom nul coyoteRequest.listenerStart=Une exception s''est produite lors de l''envoi de l''\u00e9v\u00e8nement contexte initialis\u00e9 \u00e0 l''instance de classe d''\u00e9coute {0} coyoteRequest.listenerStop=Une exception s''est produite lors de l''envoi de l''\u00e9v\u00e8nement contexte d\u00e9truit \u00e0 l''instance de classe d''\u00e9coute {0} coyoteRequest.attributeEvent=Une exception a \u00e9t\u00e9 lanc\u00e9e par l''instance d''\u00e9coute pour l''\u00e9v\u00e8nement attributs (attributes) -coyoteRequest.postTooLarge=Les param\u00e8tres n''ont pas \u00e9t\u00e9 \u00e9valu\u00e9 car la taille des donn\u00e9es post\u00e9es est trop important. Utilisez l''attribut maxPostSize du connecteur pour corriger ce probl\u00e8me si votre application doit accepter des POSTs importants. +coyoteRequest.postTooLarge=Les param\u00e8tres n''ont pas \u00e9t\u00e9 \u00e9valu\u00e9s car la taille des donn\u00e9es post\u00e9es est trop important. Utilisez l''attribut maxPostSize du connecteur pour corriger ce probl\u00e8me si votre application doit accepter des POSTs importants. # Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings_fr.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings_fr.properties?rev=894586&r1=894585&r2=894586&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/LocalStrings_fr.properties (original) +++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings_fr.properties Wed Dec 30 11:07:22 2009 @@ -23,9 +23,9 @@ applicationDispatcher.include.throw=La ressource incluse (included) a lanc\u00e9 une exception applicationDispatcher.isUnavailable=La servlet {0} est actuellement indisponible applicationDispatcher.serviceException="Servlet.service()" pour la servlet {0} a lanc\u00e9 une exception -appli
DO NOT REPLY [Bug 48418] new file ha/LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48418 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Mark Thomas 2009-12-30 03:08:09 GMT --- Not strictly a duplicate but it is easier to manage the updates to the French translations as a single issue rather than 4 separate issues. *** This bug has been marked as a duplicate of bug 48417 *** -- 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 48417] series of patches to LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 --- Comment #1 from Mark Thomas 2009-12-30 03:08:09 GMT --- *** Bug 48418 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48419] new file mbeans/LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48419 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Mark Thomas 2009-12-30 03:08:27 GMT --- Not strictly a duplicate but it is easier to manage the updates to the French translations as a single issue rather than 4 separate issues. *** This bug has been marked as a duplicate of bug 48417 *** -- 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 48417] series of patches to LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 --- Comment #2 from Mark Thomas 2009-12-30 03:08:27 GMT --- *** Bug 48419 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48420] new file tribes/LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48420 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Mark Thomas 2009-12-30 03:08:46 GMT --- Not strictly a duplicate but it is easier to manage the updates to the French translations as a single issue rather than 4 separate issues. *** This bug has been marked as a duplicate of bug 48417 *** -- 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 48417] series of patches to LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 --- Comment #3 from Mark Thomas 2009-12-30 03:08:46 GMT --- *** Bug 48420 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r894587 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Wed Dec 30 11:10:26 2009 New Revision: 894587 URL: http://svn.apache.org/viewvc?rev=894587&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=894587&r1=894586&r2=894587&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Dec 30 11:10:26 2009 @@ -110,3 +110,10 @@ http://svn.apache.org/viewvc?rev=894580&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 + Correct French trabslations + Patches provided by André Warnier + http://svn.apache.org/viewvc?rev=894586&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 48417] series of patches to LocalStrings_fr.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=48417 --- Comment #4 from Mark Thomas 2009-12-30 03:10:34 GMT --- Many thanks for the patches. They have been applied to trunk (Tomcat 7) 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r894588 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Wed Dec 30 11:14:36 2009 New Revision: 894588 URL: http://svn.apache.org/viewvc?rev=894588&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=894588&r1=894587&r2=894588&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Dec 30 11:14:36 2009 @@ -117,3 +117,11 @@ http://svn.apache.org/viewvc?rev=894586&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48398 + Objects used as locks should be final + https://issues.apache.org/bugzilla/attachment.cgi?id=24714 + https://issues.apache.org/bugzilla/attachment.cgi?id=24717 + Patches provided by sebb + +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 48398] Lock fields should be final
https://issues.apache.org/bugzilla/show_bug.cgi?id=48398 --- Comment #2 from Mark Thomas 2009-12-30 03:15:00 GMT --- The patches already been applied to trunk. I have proposed them 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
svn commit: r894591 - /tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
Author: markt Date: Wed Dec 30 11:30:01 2009 New Revision: 894591 URL: http://svn.apache.org/viewvc?rev=894591&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48345 Patch provided by Keiichi Fujino Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StoreBase.java?rev=894591&r1=894590&r2=894591&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/StoreBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Wed Dec 30 11:30:01 2009 @@ -188,14 +188,17 @@ if (manager.getContainer().getLogger().isDebugEnabled()) { manager.getContainer().getLogger().debug(getStoreName()+ ": processExpires check number of " + keys.length + " sessions" ); } - + +long timeNow = System.currentTimeMillis(); + for (int i = 0; i < keys.length; i++) { try { StandardSession session = (StandardSession) load(keys[i]); if (session == null) { continue; } -if (session.isValid()) { +int timeIdle = (int) ((timeNow - session.getThisAccessedTime()) / 1000L); +if (timeIdle < session.getMaxInactiveInterval()) { continue; } if (manager.getContainer().getLogger().isDebugEnabled()) { @@ -208,7 +211,7 @@ // expire swapped out session session.expire(); } -remove(session.getIdInternal()); +remove(keys[i]); } catch (Exception e) { manager.getContainer().getLogger().error("Session: "+keys[i]+"; ", e); try { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r894592 - /tomcat/trunk/java/org/apache/catalina/session/StoreBase.java
Author: markt Date: Wed Dec 30 11:30:33 2009 New Revision: 894592 URL: http://svn.apache.org/viewvc?rev=894592&view=rev Log: Fix indent Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StoreBase.java?rev=894592&r1=894591&r2=894592&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/StoreBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Wed Dec 30 11:30:33 2009 @@ -175,7 +175,7 @@ public void processExpires() { String[] keys = null; - if(!started) { +if(!started) { return; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r894594 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Wed Dec 30 11:36:41 2009 New Revision: 894594 URL: http://svn.apache.org/viewvc?rev=894594&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=894594&r1=894593&r2=894594&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Dec 30 11:36:41 2009 @@ -125,3 +125,10 @@ Patches provided by sebb +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48345 + Sessions timed out too early when using PersistentManager + Port of patch by Keiichi Fujino + http://people.apache.org/~markt/patches/2009-12-30-bug48345.patch + +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 48345] Session does time-out shorter than setting in web.xml when PersistentManager is used.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48345 --- Comment #2 from Mark Thomas 2009-12-30 03:36:58 GMT --- Thanks for the patch. I have committed it to trunk and proposed a variation 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
svn commit: r894599 - in /tomcat/trunk/java/org/apache/catalina/startup: LocalStrings.properties WebXml.java
Author: markt Date: Wed Dec 30 12:02:26 2009 New Revision: 894599 URL: http://svn.apache.org/viewvc?rev=894599&view=rev Log: Prevent definition of duplicate URIs for tag libraries and improve error messages for all duplicates Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/WebXml.java Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=894599&r1=894598&r2=894599&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Wed Dec 30 12:02:26 2009 @@ -116,12 +116,13 @@ userConfig.stop=UserConfig: Processing STOP webRuleSet.absoluteOrdering= element not valid in web-fragment.xml and will be ignored webRuleSet.relativeOrdering= element not valid in web.xml and will be ignored -webXml.duplicateEnvEntry=Duplicate env-entry name -webXml.duplicateFilter=Duplicate filter name -webXml.duplicateMessageDestination=Duplicate message-destination name -webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name -webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name -webXml.duplicateResourceRef=Duplicate resource-ref name +webXml.duplicateEnvEntry=Duplicate env-entry name [{0}] +webXml.duplicateFilter=Duplicate filter name [{0}] +webXml.duplicateMessageDestination=Duplicate message-destination name [{0}] +webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name [{0}] +webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name [{0}] +webXml.duplicateResourceRef=Duplicate resource-ref name [{0}] +webXml.duplicateTaglibUri=Duplicate tag library URI [{0}] webXml.reservedName=A web.xml file was detected using a reserved name [{0}]. The name element will be ignored for this fragment. webXml.mergeConflictDisplayName=The display name was defined in multiple fragments with different values including fragment with name [{0}] located at [{1}] webXml.mergeConflictErrorPage=The Error Page for [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] Modified: tomcat/trunk/java/org/apache/catalina/startup/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebXml.java?rev=894599&r1=894598&r2=894599&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/WebXml.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebXml.java Wed Dec 30 12:02:26 2009 @@ -194,7 +194,8 @@ if (filters.containsKey(filter.getFilterName())) { // Filter names must be unique within a web(-fragment).xml throw new IllegalArgumentException( -sm.getString("webXml.duplicateFilter")); +sm.getString("webXml.duplicateFilter", +filter.getFilterName())); } filters.put(filter.getFilterName(), filter); } @@ -279,6 +280,11 @@ // jsp-config/taglib or taglib (2.3 and earlier) private Map taglibs = new HashMap(); public void addTaglib(String uri, String location) { +if (taglibs.containsKey(uri)) { +// Taglib URIs must be unique within a web(-fragment).xml +throw new IllegalArgumentException( +sm.getString("webXml.duplicateTaglibUri", uri)); +} taglibs.put(uri, location); } public Map getTaglibs() { return taglibs; } @@ -329,7 +335,8 @@ if (envEntries.containsKey(envEntry.getName())) { // env-entry names must be unique within a web(-fragment).xml throw new IllegalArgumentException( -sm.getString("webXml.duplicateEnvEntry")); +sm.getString("webXml.duplicateEnvEntry", +envEntry.getName())); } envEntries.put(envEntry.getName(),envEntry); } @@ -373,7 +380,8 @@ if (resourceRefs.containsKey(resourceRef.getName())) { // resource-ref names must be unique within a web(-fragment).xml throw new IllegalArgumentException( -sm.getString("webXml.duplicateResourceRef")); +sm.getString("webXml.duplicateResourceRef", +resourceRef.getName())); } resourceRefs.put(resourceRef.getName(), resourceRef); } @@ -389,7 +397,8 @@ if (resourceEnvRefs.containsKey(resourceEnvRef.getName())) { // resource-env-ref names must be unique within a web(-fragment).xml throw new IllegalArgumentException( -sm.getString("webXml.duplicateResourceEn
DO NOT REPLY [Bug 48464] New: Feature request: startup.bat: -title option needed
https://issues.apache.org/bugzilla/show_bug.cgi?id=48464 Summary: Feature request: startup.bat: -title option needed Product: Tomcat 6 Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: enhancement Priority: P2 Component: Native:Integration AssignedTo: dev@tomcat.apache.org ReportedBy: lovet...@qq.com Created an attachment (id=24780) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24780) Patches for startup.bat(svn#562770), catelina.bat (svn#885002). Usage screenshot When running muitiple tomcat instances in same windows OS, the title of all tomcat/DOS window are all "Tomcat", it's a little hard to distinguish which window is which tomcat. If a title can be added, for example: bin\startup.bat -title "Tomcat Server 1 - XXX" bin\startup.bat -title "Tomcat Server 2 - YYY" bin\startup.bat -title "Tomcat Server 3 - ZZZ" ... Then I can distinguish these servers from the title of tomcat/DOS window in task bar. -- 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 45255] support disable jsessionid from url against session fixation attacks
https://issues.apache.org/bugzilla/show_bug.cgi?id=45255 --- Comment #23 from jcran 2009-12-30 07:36:31 UTC --- Really pleased to see this integrated. Thank you Mark / Dillon. Just to be clear, we're waiting until Tomcat 7 to be able to remove the JSessionID from the url? -- 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 45255] support disable jsessionid from url against session fixation attacks
https://issues.apache.org/bugzilla/show_bug.cgi?id=45255 jcran changed: What|Removed |Added CC||jc...@0x0e.org -- 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 45255] support disable jsessionid from url against session fixation attacks
https://issues.apache.org/bugzilla/show_bug.cgi?id=45255 --- Comment #24 from Mark Thomas 2009-12-30 07:50:25 GMT --- (In reply to comment #23) > Really pleased to see this integrated. Thank you Mark / Dillon. > > Just to be clear, we're waiting until Tomcat 7 to be able to remove the > JSessionID from the url? Yes, but Tomcat 5 & 6 will change the session ID on authentication which addresses the root cause of the session fixation. With that fixed whether or not the session ID is in the URL is moot. -- 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: r894659 - in /tomcat/trunk/java/org/apache/jasper: compiler/TldLocationsCache.java xmlparser/ParserUtils.java
Author: markt Date: Wed Dec 30 16:04:23 2009 New Revision: 894659 URL: http://svn.apache.org/viewvc?rev=894659&view=rev Log: Get Jasper to use same web.xml (including merging if appropriate) as Catalina by default. If no merged web.xml is found, fall back to previous behaviour. Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=894659&r1=894658&r2=894659&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Wed Dec 30 16:04:23 2009 @@ -17,6 +17,7 @@ package org.apache.jasper.compiler; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -237,50 +238,67 @@ * This is not kept in sync with o.a.c.startup.TldConfig as the Jasper only * needs the URI to TLD mappings from scan web.xml whereas TldConfig needs * to scan the actual TLD files. + * + * Search order is: + * - web.xml scanned by Tomcat and placed in context attribute + * - location specified by ALT_DD_ATTR + * - /WEB-INF/web.xml */ private void tldScanWebXml() throws Exception { InputStream is = null; +String systemId = null; try { -// Acquire input stream to web application deployment descriptor -String altDDName = (String)ctxt.getAttribute( -Constants.ALT_DD_ATTR); -URL uri = null; -if (altDDName != null) { -try { -uri = new URL(FILE_PROTOCOL+altDDName.replace('\\', '/')); -} catch (MalformedURLException e) { -if (log.isWarnEnabled()) { +// Is a web.xml provided as context attribute? +String webXml = (String) ctxt.getAttribute( +org.apache.tomcat.util.scan.Constants.MERGED_WEB_XML); +if (webXml != null) { +is = new ByteArrayInputStream(webXml.getBytes()); +systemId = org.apache.tomcat.util.scan.Constants.MERGED_WEB_XML; +} + +// If not available as context attribute, look for an alternative +// location +if (is == null) { +// Acquire input stream to web application deployment descriptor +String altDDName = (String)ctxt.getAttribute( +Constants.ALT_DD_ATTR); +if (altDDName != null) { +try { +URL uri = +new URL(FILE_PROTOCOL+altDDName.replace('\\', '/')); +is = uri.openStream(); +systemId = uri.toExternalForm(); +} catch (MalformedURLException e) { log.warn(Localizer.getMessage( -"jsp.error.internal.filenotfound", -altDDName)); +"jsp.error.internal.filenotfound", +altDDName)); } } -} else { -uri = ctxt.getResource(WEB_XML); -if (uri == null && log.isWarnEnabled()) { +} + +// Finally, try the default /WEB-INF/web.xml +if (is == null) { +URL uri = ctxt.getResource(WEB_XML); +if (uri == null) { log.warn(Localizer.getMessage( -"jsp.error.internal.filenotfound", -WEB_XML)); +"jsp.error.internal.filenotfound", WEB_XML)); +} else { +is = uri.openStream(); +systemId = uri.toExternalForm(); } } -if (uri == null) { +if (is == null) { return; } -is = uri.openStream(); InputSource ip = new InputSource(is); -ip.setSystemId(uri.toExternalForm()); +ip.setSystemId(systemId); // Parse the web application deployment descriptor TreeNode webtld = null; -// altDDName is the absolute path of the DD -if (altDDName != null) { -webtld = new ParserUtils().parseXMLDocument(altDDName, ip); -} else { -webtld = new ParserUtils().parseXMLDocument(WEB
DO NOT REPLY [Bug 45255] support disable jsessionid from url against session fixation attacks
https://issues.apache.org/bugzilla/show_bug.cgi?id=45255 --- Comment #25 from jcran 2009-12-30 08:14:01 UTC --- (In reply to comment #24) > ... > Yes, but Tomcat 5 & 6 will change the session ID on authentication which > addresses the root cause of the session fixation. With that fixed whether or > not the session ID is in the URL is moot. So it appears that the session ID in the URL will be encrypted. I had to do some sniffing / digging myself - http://answers.google.com/answers/threadview/id/758002.html - but it's still bad practice, and introduces vulnerability. Consider the case of a proxy server, or of your own browser history. If you take a look, you'll see that jsessionid's are getting cached in the history, regardless of whether they were handed out after authentication or not. That aside, there's no reason that the browser couldn't cache the entire response, thus making this whole point moot -- it just doesn't out of the box. Removing the session ID from the URL would prevent browser history caching of a Session ID. -- 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 45255] support disable jsessionid from url against session fixation attacks
https://issues.apache.org/bugzilla/show_bug.cgi?id=45255 --- Comment #26 from Mark Thomas 2009-12-30 08:37:02 GMT --- (In reply to comment #25) > So it appears that the session ID in the URL will be encrypted. I had to do > some sniffing / digging myself - > http://answers.google.com/answers/threadview/id/758002.html - but it's still > bad practice, and introduces vulnerability. This is FUD. There is no vulnerability here. > Consider the case of a proxy server, or of your own browser history. If you > take a look, you'll see that jsessionid's are getting cached in the history, > regardless of whether they were handed out after authentication or not. > > That aside, there's no reason that the browser couldn't cache the entire > response, thus making this whole point moot -- it just doesn't out of the box. > Removing the session ID from the URL would prevent browser history caching of > a > Session ID. More FUD. The situations you describe are not vulnerabilities. Since Bugzilla is neither a support forum nor a discussion forum, if you wish to continue this discussion further, please do so on the users list. -- 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: r894672 - in /tomcat/trunk/java/org/apache/jasper: compiler/JspConfig.java compiler/TldLocationsCache.java compiler/WebXml.java resources/LocalStrings.properties
Author: markt Date: Wed Dec 30 16:51:52 2009 New Revision: 894672 URL: http://svn.apache.org/viewvc?rev=894672&view=rev Log: New helper class to provide web.xml to those Jasper classes that need to parse it. JspConfig was not consistent with TldLocationsCache. These are now consistent. JspConfig now has access to the merged web.xml generated by Catalina from web-fragment.xml files and/or annotations. Added: tomcat/trunk/java/org/apache/jasper/compiler/WebXml.java (with props) Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java?rev=894672&r1=894671&r2=894672&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java Wed Dec 30 16:51:52 2009 @@ -17,10 +17,8 @@ package org.apache.jasper.compiler; -import java.io.InputStream; import java.util.Iterator; import java.util.Vector; -import java.net.URL; import javax.servlet.ServletContext; @@ -29,7 +27,6 @@ import org.apache.jasper.xmlparser.TreeNode; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; -import org.xml.sax.InputSource; /** * Handles the jsp-config element in WEB_INF/web.xml. This is used @@ -41,8 +38,6 @@ public class JspConfig { -private static final String WEB_XML = "/WEB-INF/web.xml"; - // Logger private final Log log = LogFactory.getLog(JspConfig.class); @@ -75,23 +70,16 @@ return 2.3; } -private void processWebDotXml(ServletContext ctxt) throws JasperException { +private void processWebDotXml() throws JasperException { -InputStream is = null; +WebXml webXml = null; try { -URL uri = ctxt.getResource(WEB_XML); -if (uri == null) { -// no web.xml -return; -} - -is = uri.openStream(); -InputSource ip = new InputSource(is); -ip.setSystemId(uri.toExternalForm()); - +webXml = new WebXml(ctxt); + ParserUtils pu = new ParserUtils(); -TreeNode webApp = pu.parseXMLDocument(WEB_XML, ip); +TreeNode webApp = pu.parseXMLDocument(webXml.getSystemId(), +webXml.getInputSource()); if (webApp == null || getVersion(webApp) < 2.4) { @@ -222,10 +210,8 @@ } catch (Exception ex) { throw new JasperException(ex); } finally { -if (is != null) { -try { -is.close(); -} catch (Throwable t) {} +if (webXml != null) { +webXml.close(); } } } @@ -235,7 +221,7 @@ if (!initialized) { synchronized (this) { if (!initialized) { -processWebDotXml(ctxt); +processWebDotXml(); defaultJspProperty = new JspProperty(defaultIsXml, defaultIsELIgnored, defaultIsScriptingInvalid, Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=894672&r1=894671&r2=894672&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Wed Dec 30 16:51:52 2009 @@ -81,9 +81,6 @@ public class TldLocationsCache { -// Logger -private final Log log = LogFactory.getLog(TldLocationsCache.class); - /** * The types of URI one may specify for a tag library */ @@ -93,8 +90,6 @@ private static final String WEB_INF = "/WEB-INF/"; private static final String WEB_INF_LIB = "/WEB-INF/lib/"; -private static final String WEB_XML = "/WEB-INF/web.xml"; -private static final String FILE_PROTOCOL = "file:"; private static final String JAR_EXT = ".jar"; private static final String TLD_EXT = ".tld"; @@ -238,67 +233,17 @@ * This is not kept in sync with o.a.c.startup.TldConfig as the Jasper only * needs the URI to TLD mappings from scan web.xml whereas TldConfig needs * to scan the actual TLD files. - * - * Search order is: - * - web.xml scanned by Tomcat and placed in context attribute - * - location specified by ALT_DD_ATTR - * - /WEB-INF/web.xml */ private void tldS
svn commit: r894688 - in /tomcat/trunk/java/javax/el: BeanELResolver.java CompositeELResolver.java ELResolver.java ExpressionFactory.java
Author: markt Date: Wed Dec 30 18:21:26 2009 New Revision: 894688 URL: http://svn.apache.org/viewvc?rev=894688&view=rev Log: API changes for JSP/EL 2.2 changes. Dummy implementations where implmentation is required. Modified: tomcat/trunk/java/javax/el/BeanELResolver.java tomcat/trunk/java/javax/el/CompositeELResolver.java tomcat/trunk/java/javax/el/ELResolver.java tomcat/trunk/java/javax/el/ExpressionFactory.java Modified: tomcat/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=894688&r1=894687&r2=894688&view=diff == --- tomcat/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/trunk/java/javax/el/BeanELResolver.java Wed Dec 30 18:21:26 2009 @@ -350,4 +350,12 @@ } } + + @Override +public Object invoke(ELContext context, Object base, Object method, +Class[] paramTypes, Object[] params) { +// TODO +return null; +} + } Modified: tomcat/trunk/java/javax/el/CompositeELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/CompositeELResolver.java?rev=894688&r1=894687&r2=894688&view=diff == --- tomcat/trunk/java/javax/el/CompositeELResolver.java (original) +++ tomcat/trunk/java/javax/el/CompositeELResolver.java Wed Dec 30 18:21:26 2009 @@ -124,6 +124,13 @@ return null; } +@Override +public Object invoke(ELContext context, Object base, Object method, +Class[] paramTypes, Object[] params) { +// TODO +return null; +} + private final static class FeatureIterator implements Iterator { private final ELContext context; Modified: tomcat/trunk/java/javax/el/ELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELResolver.java?rev=894688&r1=894687&r2=894688&view=diff == --- tomcat/trunk/java/javax/el/ELResolver.java (original) +++ tomcat/trunk/java/javax/el/ELResolver.java Wed Dec 30 18:21:26 2009 @@ -66,4 +66,12 @@ public abstract Iterator getFeatureDescriptors(ELContext context, Object base); public abstract Class getCommonPropertyType(ELContext context, Object base); + +public Object invoke(@SuppressWarnings("unused") ELContext context, +@SuppressWarnings("unused") Object base, +@SuppressWarnings("unused") Object method, +@SuppressWarnings("unused") Class[] paramTypes, +@SuppressWarnings("unused") Object[] params) { +return null; +} } Modified: tomcat/trunk/java/javax/el/ExpressionFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ExpressionFactory.java?rev=894688&r1=894687&r2=894688&view=diff == --- tomcat/trunk/java/javax/el/ExpressionFactory.java (original) +++ tomcat/trunk/java/javax/el/ExpressionFactory.java Wed Dec 30 18:21:26 2009 @@ -17,6 +17,8 @@ package javax.el; +import java.util.Properties; + /** * * @since 2.1 @@ -37,4 +39,13 @@ String expression, Class expectedReturnType, Class[] expectedParamTypes) throws ELException, NullPointerException; + +public static ExpressionFactory newInstance() { +return newInstance(null); +} + +public static ExpressionFactory newInstance(Properties properties) { +// TODO +return null; +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 43819] Support latest JSR245 proposal to make EL "self-contained"
https://issues.apache.org/bugzilla/show_bug.cgi?id=43819 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Component|Servlet & JSP API |Servlet & JSP API Version|6.0.14 |trunk Resolution|LATER | Product|Tomcat 6|Tomcat 7 Target Milestone|default |--- --- Comment #12 from Mark Thomas 2009-12-30 10:31:41 GMT --- Re-opening to evaluate the patches as these changes did become part of JSP 2.2 -- 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: r894718 - in /tomcat/trunk/java/org/apache/catalina/startup: ContextConfig.java WebRuleSet.java WebXml.java
Author: markt Date: Wed Dec 30 21:50:33 2009 New Revision: 894718 URL: http://svn.apache.org/viewvc?rev=894718&view=rev Log: Fix an problem highlighted by the JSP 2.1 TCK. Only provide merged 3.0+ web.xml for 3.0+ apps. Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/trunk/java/org/apache/catalina/startup/WebXml.java 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=894718&r1=894717&r2=894718&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Dec 30 21:50:33 2009 @@ -1190,7 +1190,13 @@ InputSource contextWebXml = getContextWebXmlSource(); parseWebXml(contextWebXml, webXml, false); -if (!webXml.isMetadataComplete()) { +// Assuming 0 is safe for what is required in this case +double webXmlVersion = 0; +if (webXml.getVersion() != null) { +webXmlVersion = Double.parseDouble(webXml.getVersion()); +} + +if (webXmlVersion >= 3 && !webXml.isMetadataComplete()) { // Process /WEB-INF/classes for annotations URL webinfClasses; try { @@ -1219,19 +1225,21 @@ // Apply merged web.xml to Context webXml.configureContext(context); + +// Make the merged web.xml available to other components, +// specifically Jasper, to save those components from having to +// re-generate it. +String mergedWebXml = webXml.toXml(); +context.getServletContext().setAttribute( + org.apache.tomcat.util.scan.Constants.MERGED_WEB_XML, +mergedWebXml); +if (context.getLogEffectiveWebXml()) { +log.info("web.xml:\n" + mergedWebXml); +} } else { -// Apply merged web.xml to Context +// Apply unmerged web.xml to Context webXml.configureContext(context); -} -// Make the merged web.xml available to other components, specifically -// Jasper, to save those components from having to re-generate it. -String mergedWebXml = webXml.toXml(); -context.getServletContext().setAttribute( - org.apache.tomcat.util.scan.Constants.MERGED_WEB_XML, -mergedWebXml); -if (context.getLogEffectiveWebXml()) { -log.info("web.xml:\n" + mergedWebXml); -} +} } Modified: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java?rev=894718&r1=894717&r2=894718&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java Wed Dec 30 21:50:33 2009 @@ -160,6 +160,8 @@ new SetPublicIdRule("setPublicId")); digester.addRule(fullPrefix, new IgnoreAnnotationsRule()); +digester.addRule(fullPrefix, +new VersionRule()); if (fragment) { // web-fragment.xml @@ -1007,6 +1009,33 @@ } /** + * A Rule that records the spec version of the web.xml being parsed + * + */ + +final class VersionRule extends Rule { + +public VersionRule() { +// NO-OP +} + +@Override +public void begin(String namespace, String name, Attributes attributes) +throws Exception { +WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1); +webxml.setVersion(attributes.getValue("version")); + +if (digester.getLogger().isDebugEnabled()) { +digester.getLogger().debug +(webxml.getClass().getName() + ".setVersion( " + +webxml.getVersion() + ")"); +} +} + +} + + +/** * A rule that logs a warning if absolute ordering is configured. */ final class AbsoluteOrderingRule extends Rule { Modified: tomcat/trunk/java/org/apache/catalina/startup/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebXml.java?rev=894718&r1=894717&r2=894718&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/WebXml.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebXml.java Wed Dec 30 21:50:33 2009 @@ -505,7 +505,14 @@ sb.append("\"http://www.w3.org/2001/XMLSchema-instance\"\n";); sb.append
svn commit: r894720 - in /tomcat/trunk/java: javax/el/ org/apache/jasper/compiler/ org/apache/jasper/runtime/
Author: markt Date: Wed Dec 30 22:20:30 2009 New Revision: 894720 URL: http://svn.apache.org/viewvc?rev=894720&view=rev Log: Implement ExpressionFactory.newInstance() and ensure that Jasper does not refer to org.apache.el directly JSP 2.1 TCK passes with these changes applied Modified: tomcat/trunk/java/javax/el/ExpressionFactory.java tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java tomcat/trunk/java/org/apache/jasper/compiler/Validator.java tomcat/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java Modified: tomcat/trunk/java/javax/el/ExpressionFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ExpressionFactory.java?rev=894720&r1=894719&r2=894720&view=diff == --- tomcat/trunk/java/javax/el/ExpressionFactory.java (original) +++ tomcat/trunk/java/javax/el/ExpressionFactory.java Wed Dec 30 22:20:30 2009 @@ -17,6 +17,16 @@ package javax.el; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.Properties; /** @@ -25,6 +35,15 @@ */ public abstract class ExpressionFactory { +private static final String SERVICE_RESOURCE_NAME = +"META-INF/services/javax.el.ExpressionFactory"; + +private static final String SEP = System.getProperty("file.separator"); +private static final String PROPERTY_FILE = +System.getProperty("java.home") + "jre" + SEP + "lib" + SEP + +"el.properties"; +private static final String PROPERTY_NAME = "javax.el.ExpressionFactory"; + public abstract Object coerceToType(Object obj, Class expectedType) throws ELException; @@ -39,13 +58,172 @@ String expression, Class expectedReturnType, Class[] expectedParamTypes) throws ELException, NullPointerException; - + +/** + * Create a new {...@link ExpressionFactory}. The class to use is determined by + * the following search order: + * + * services API (META-INF/services/javax.el.ExpressionFactory) + * $JRE_HOME/lib/el.properties - key javax.el.ExpressionFactory + * javax.el.ExpressionFactory + * Platform default implementation - + * org.apache.el.ExpressionFactoryImpl + * + * @return + */ public static ExpressionFactory newInstance() { return newInstance(null); } +/** + * Create a new {...@link ExpressionFactory} passing in the provided + * {...@link Properties}. Search order is the same as {...@link #newInstance()}. + * + * @param properties + * @return + */ public static ExpressionFactory newInstance(Properties properties) { -// TODO +String className = null; +ExpressionFactory result = null; + +ClassLoader tccl = Thread.currentThread().getContextClassLoader(); + +// First services API +className = getClassNameServices(tccl); +if (className == null) { +// Second el.properties file +className = getClassNameJreDir(); +} +if (className == null) { +// Third system property +className = getClassNameSysProp(); +} +if (className == null) { +// Fourth - default +className = "org.apache.el.ExpressionFactoryImpl"; +} + +try { +Class clazz = null; +if (tccl == null) { +clazz = Class.forName(className); +} else { +clazz = tccl.loadClass(className); +} +Constructor constructor = null; +// Do we need to look for a constructor that will take properties? +if (properties != null) { +try { +constructor = clazz.getConstructor(Properties.class); +} catch (SecurityException se) { +throw new ELException(se); +} catch (NoSuchMethodException nsme) { +// This can be ignored +// This is OK for this constructor not to exist +} +} +if (constructor == null) { +result = (ExpressionFactory) clazz.newInstance(); +} else { +result = +(ExpressionFactory) constructor.newInstance(properties); +} + +} catch (ClassNotFoundException e) { +throw new ELException( +"Unable to find ExpressionFactory of type: " + className, +e); +} ca