svn commit: r657404 [1/2] - in /tomcat/trunk/java/org/apache/el/parser: ELParser.html ELParser.java ELParser.jjt ELParserConstants.java ELParserTokenManager.java ParseException.java
Author: markt Date: Sat May 17 10:33:43 2008 New Revision: 657404 URL: http://svn.apache.org/viewvc?rev=657404&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44994 Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} does not throw an exception The patch is bigger than I would like due to the code generation tools used Modified: tomcat/trunk/java/org/apache/el/parser/ELParser.html tomcat/trunk/java/org/apache/el/parser/ELParser.java tomcat/trunk/java/org/apache/el/parser/ELParser.jjt tomcat/trunk/java/org/apache/el/parser/ELParserConstants.java tomcat/trunk/java/org/apache/el/parser/ELParserTokenManager.java tomcat/trunk/java/org/apache/el/parser/ParseException.java Modified: tomcat/trunk/java/org/apache/el/parser/ELParser.html URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/ELParser.html?rev=657404&r1=657403&r2=657404&view=diff == --- tomcat/trunk/java/org/apache/el/parser/ELParser.html (original) +++ tomcat/trunk/java/org/apache/el/parser/ELParser.html Sat May 17 10:33:43 2008 @@ -51,7 +51,7 @@ Choice ::= -Or (Or Choice )* +Or ( Choice Choice )* Or Modified: tomcat/trunk/java/org/apache/el/parser/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/ELParser.java?rev=657404&r1=657403&r2=657404&view=diff == --- tomcat/trunk/java/org/apache/el/parser/ELParser.java (original) +++ tomcat/trunk/java/org/apache/el/parser/ELParser.java Sat May 17 10:33:43 2008 @@ -27,15 +27,6 @@ throw new ELException(pe.getMessage()); } } - - public static void main(String[] argv) throws Exception { - String[] str = { "${foo()}", "${fn.fn:foo() ? a : b}", "${fn:foo() ? (fn_af.f:fd() ? a : b) : b}", "${a.b.c ? a : b}" }; - for (int i = 0; i < str.length; i++) { - SimpleNode sn = (SimpleNode) ELParser.parse(str[i]); - System.out.println("\n" + str[i]); - sn.dump("\t"); - } - } /* * CompositeExpression @@ -216,31 +207,31 @@ break label_2; } jj_consume_token(QUESTIONMARK); - Or(); + Choice(); jj_consume_token(COLON); -AstChoice jjtn001 = new AstChoice(JJTCHOICE); -boolean jjtc001 = true; -jjtree.openNodeScope(jjtn001); +AstChoice jjtn001 = new AstChoice(JJTCHOICE); +boolean jjtc001 = true; +jjtree.openNodeScope(jjtn001); try { Choice(); } catch (Throwable jjte001) { -if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; -} else { - jjtree.popNode(); -} -if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} -} -if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} -} -{if (true) throw (Error)jjte001;} +if (jjtc001) { + jjtree.clearNodeScope(jjtn001); + jjtc001 = false; +} else { + jjtree.popNode(); +} +if (jjte001 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte001;} +} +if (jjte001 instanceof ParseException) { + {if (true) throw (ParseException)jjte001;} +} +{if (true) throw (Error)jjte001;} } finally { -if (jjtc001) { - jjtree.clos
svn commit: r657405 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Sat May 17 10:36:26 2008 New Revision: 657405 URL: http://svn.apache.org/viewvc?rev=657405&view=rev Log: Propose fix for 44994 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=657405&r1=657404&r2=657405&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sat May 17 10:36:26 2008 @@ -68,3 +68,10 @@ +1: markt -1: remm (I think it is a good patch, but it throws an error for something which was working before, so I would think keeping it for the next release would be better) + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44994 + Correct BNF grammar so ${0 lt a ? 1 lt a ? "many": "one": "none"} works + http://svn.apache.org/viewvc?rev=657404&view=rev + Note patch is larger than strictly necessary due to autogenerated code + +1: markt + -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 44994] JSP EL condition expression fails when nested: ${a ? b ? x: y: z}
https://issues.apache.org/bugzilla/show_bug.cgi?id=44994 --- Comment #1 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-17 10:36:36 PST --- This has been fixed in trunk and proposed for 6.0.x -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 43285] Missing EL Coercion causes argument type mismatch
https://issues.apache.org/bugzilla/show_bug.cgi?id=43285 Mark Thomas <[EMAIL PROTECTED]> changed: What|Removed |Added Severity|major |enhancement --- Comment #11 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-17 10:48:44 PST --- That the RI has a bug and is not spec compliant is not a justification for deliberately inserting the same bug in Tomcat. That said, I am not against an enhancement that makes this configurable. Jasper can't get at the Tomcat context configuration without making Jasper dependant on Tomcat internals, something we try not do to. To be consistent with similar configuration options it could be done with a system property (see http://svn.apache.org/repos/asf/tomcat/trunk/webapps/docs/config/systemprops.xml for examples). The code would need to ensure that setting org.apache.catalina.STRICT_SERVLET_COMPLIANCE overrides the new setting that allows nulls. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r657429 - in /tomcat/trunk/webapps/examples: WEB-INF/classes/cal/ WEB-INF/classes/colors/ WEB-INF/classes/compressionFilters/ WEB-INF/classes/jsp2/examples/simpletag/ jsp/colors/
Author: markt Date: Sat May 17 11:52:23 2008 New Revision: 657429 URL: http://svn.apache.org/viewvc?rev=657429&view=rev Log: Fix some Eclipse warnings in the examples webapp. Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilterTestServlet.java tomcat/trunk/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java tomcat/trunk/webapps/examples/jsp/colors/colrs.jsp Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java?rev=657429&r1=657428&r2=657429&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/Entries.java Sat May 17 11:52:23 2008 @@ -21,14 +21,14 @@ public class Entries { - private Hashtable entries; + private Hashtable entries; private static final String[] time = {"8am", "9am", "10am", "11am", "12pm", "1pm", "2pm", "3pm", "4pm", "5pm", "6pm", "7pm", "8pm" }; public static final int rows = 12; public Entries () { - entries = new Hashtable (rows); + entries = new Hashtable (rows); for (int i=0; i < rows; i++) { entries.put (time[i], new Entry(time[i])); } @@ -39,7 +39,7 @@ } public Entry getEntry (int index) { -return (Entry)this.entries.get(time[index]); +return this.entries.get(time[index]); } public int getIndex (String tm) { @@ -52,7 +52,7 @@ int index = getIndex (tm); if (index >= 0) { String descr = request.getParameter ("description"); - ((Entry)entries.get(time[index])).setDescription (descr); + entries.get(time[index]).setDescription (descr); } } Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java?rev=657429&r1=657428&r2=657429&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/cal/TableBean.java Sat May 17 11:52:23 2008 @@ -21,7 +21,7 @@ public class TableBean { - Hashtable table; + Hashtable table; JspCalendar JspCal; Entries entries; String date; @@ -30,7 +30,7 @@ boolean processError = false; public TableBean () { -this.table = new Hashtable (10); +this.table = new Hashtable (10); this.JspCal = new JspCalendar (); this.date = JspCal.getCurrentDate (); } @@ -77,7 +77,7 @@ else if (dateR.equalsIgnoreCase("next")) date = JspCal.getNextDate (); else if (dateR.equalsIgnoreCase("prev")) date = JspCal.getPrevDate (); -entries = (Entries) table.get (date); +entries = table.get (date); if (entries == null) { entries = new Entries (); table.put (date, entries); Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java?rev=657429&r1=657428&r2=657429&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java Sat May 17 11:52:23 2008 @@ -16,8 +16,6 @@ */ package colors; -import javax.servlet.http.*; - public class ColorGameBean { private String background = "yellow"; @@ -29,7 +27,7 @@ private int intval = 0; private boolean tookHints = false; -public void processRequest(HttpServletRequest request) { +public void processRequest() { // background = "yellow"; // foreground = "red"; Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java?rev=657429&r1=657428&r2=657429&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java Sat May 17 11:52:23 2008 @@ -146,7 +146,7 @@ } // Are we allowed to compress ? -
svn commit: r657439 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
Author: markt Date: Sat May 17 12:39:14 2008 New Revision: 657439 URL: http://svn.apache.org/viewvc?rev=657439&view=rev Log: Code clean-up. No functional change. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=657439&r1=657438&r2=657439&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Sat May 17 12:39:14 2008 @@ -177,7 +177,8 @@ if (index != -1) { int fromIndex = 0; while (index != -1) { -cipher = requestedCiphers.substring(fromIndex, index).trim(); +cipher = +requestedCiphers.substring(fromIndex, index).trim(); if (cipher.length() > 0) { /* * Check to see if the requested cipher is among the @@ -265,23 +266,26 @@ protected KeyStore getTrustStore(String keystoreType) throws IOException { KeyStore trustStore = null; -String trustStoreFile = (String)attributes.get("truststoreFile"); -if(trustStoreFile == null) { -trustStoreFile = System.getProperty("javax.net.ssl.trustStore"); +String truststoreFile = (String)attributes.get("truststoreFile"); +if(truststoreFile == null) { +truststoreFile = System.getProperty("javax.net.ssl.trustStore"); } if(log.isDebugEnabled()) { -log.debug("Truststore = " + trustStoreFile); +log.debug("Truststore = " + truststoreFile); } -String trustStorePassword = (String)attributes.get("truststorePass"); -if( trustStorePassword == null) { -trustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword"); + +String truststorePassword = (String)attributes.get("truststorePass"); +if( truststorePassword == null) { +truststorePassword = +System.getProperty("javax.net.ssl.trustStorePassword"); } -if( trustStorePassword == null ) { -trustStorePassword = getKeystorePassword(); +if( truststorePassword == null ) { +truststorePassword = getKeystorePassword(); } if(log.isDebugEnabled()) { -log.debug("TrustPass = " + trustStorePassword); +log.debug("TrustPass = " + truststorePassword); } + String truststoreType = (String)attributes.get("truststoreType"); if( truststoreType == null) { truststoreType = System.getProperty("javax.net.ssl.trustStoreType"); @@ -292,9 +296,10 @@ if(log.isDebugEnabled()) { log.debug("trustType = " + truststoreType); } -if (trustStoreFile != null && trustStorePassword != null){ -trustStore = getStore(truststoreType, trustStoreFile, - trustStorePassword); + +if (truststoreFile != null && truststorePassword != null){ +trustStore = getStore(truststoreType, truststoreFile, + truststorePassword); } return trustStore; @@ -310,7 +315,8 @@ InputStream istream = null; try { ks = KeyStore.getInstance(type); -if(!("PKCS11".equalsIgnoreCase(type) || "".equalsIgnoreCase(path))) { +if(!("PKCS11".equalsIgnoreCase(type) || +"".equalsIgnoreCase(path))) { File keyStoreFile = new File(path); if (!keyStoreFile.isAbsolute()) { keyStoreFile = new File(System.getProperty("catalina.base"), @@ -377,10 +383,12 @@ keystoreType = defaultKeystoreType; } -String trustAlgorithm = (String)attributes.get("truststoreAlgorithm"); -if( trustAlgorithm == null ) { -trustAlgorithm = TrustManagerFactory.getDefaultAlgorithm(); -} +String trustAlgorithm = +(String)attributes.get("truststoreAlgorithm"); +if( trustAlgorithm == null ) { +trustAlgorithm = TrustManagerFactory.getDefaultAlgorithm(); +} + // Create and init SSLContext SSLContext context = SSLContext.getInstance(protocol); context.init(getKeyManagers(keystoreType, algorithm, @@ -393,8 +401,9 @@ // Determine which cipher suites to enable String requestedCiphers = (String)attributes.get("ciphers"); -enabledCiphers = getEnabledCiphers(requestedCiphers, - sslProxy.getSu
svn commit: r657449 - in /tomcat/trunk: java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java webapps/docs/config/http.xml
Author: markt Date: Sat May 17 12:55:55 2008 New Revision: 657449 URL: http://svn.apache.org/viewvc?rev=657449&view=rev Log: Additional patch from https://issues.apache.org/bugzilla/show_bug.cgi?id=43094 Make SSL providers configurable. Based on a patch by Bruno Harbulot. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java tomcat/trunk/webapps/docs/config/http.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=657449&r1=657448&r2=657449&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Sat May 17 12:55:55 2008 @@ -250,20 +250,21 @@ /* * Gets the SSL server's keystore. */ -protected KeyStore getKeystore(String type, String pass) +protected KeyStore getKeystore(String type, String provider, String pass) throws IOException { String keystoreFile = (String)attributes.get("keystore"); if (keystoreFile == null) keystoreFile = defaultKeystoreFile; -return getStore(type, keystoreFile, pass); +return getStore(type, provider, keystoreFile, pass); } /* * Gets the SSL server's truststore. */ -protected KeyStore getTrustStore(String keystoreType) throws IOException { +protected KeyStore getTrustStore(String keystoreType, +String keystoreProvider) throws IOException { KeyStore trustStore = null; String truststoreFile = (String)attributes.get("truststoreFile"); @@ -297,9 +298,22 @@ log.debug("trustType = " + truststoreType); } +String truststoreProvider = +(String)attributes.get("truststoreProvider"); +if( truststoreProvider == null) { +truststoreProvider = +System.getProperty("javax.net.ssl.trustStoreProvider"); +} +if (truststoreProvider == null) { +truststoreProvider = keystoreProvider; +} +if(log.isDebugEnabled()) { +log.debug("trustProvider = " + truststoreProvider); +} + if (truststoreFile != null && truststorePassword != null){ -trustStore = getStore(truststoreType, truststoreFile, - truststorePassword); +trustStore = getStore(truststoreType, truststoreProvider, +truststoreFile, truststorePassword); } return trustStore; @@ -308,13 +322,17 @@ /* * Gets the key- or truststore with the specified type, path, and password. */ -private KeyStore getStore(String type, String path, String pass) -throws IOException { +private KeyStore getStore(String type, String provider, String path, +String pass) throws IOException { KeyStore ks = null; InputStream istream = null; try { -ks = KeyStore.getInstance(type); +if (provider == null) { +ks = KeyStore.getInstance(type); +} else { +ks = KeyStore.getInstance(type, provider); +} if(!("PKCS11".equalsIgnoreCase(type) || "".equalsIgnoreCase(path))) { File keyStoreFile = new File(path); @@ -383,6 +401,9 @@ keystoreType = defaultKeystoreType; } +String keystoreProvider = +(String) attributes.get("keystoreProvider"); + String trustAlgorithm = (String)attributes.get("truststoreAlgorithm"); if( trustAlgorithm == null ) { @@ -391,9 +412,11 @@ // Create and init SSLContext SSLContext context = SSLContext.getInstance(protocol); -context.init(getKeyManagers(keystoreType, algorithm, -(String) attributes.get("keyAlias")), - getTrustManagers(keystoreType, trustAlgorithm), +context.init(getKeyManagers(keystoreType, keystoreProvider, + algorithm, + (String) attributes.get("keyAlias")), + getTrustManagers(keystoreType, keystoreProvider, + trustAlgorithm), new SecureRandom()); // create proxy @@ -416,6 +439,7 @@ * Gets the initialized key managers. */ protected KeyManager[] getKeyManagers(String keystoreType, + String keystoreProvider, String algorithm, String keyAlias) throws Exce
svn commit: r657450 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Sat May 17 12:58:12 2008 New Revision: 657450 URL: http://svn.apache.org/viewvc?rev=657450&view=rev Log: Propose JSSE provider patch 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=657450&r1=657449&r2=657450&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sat May 17 12:58:12 2008 @@ -75,3 +75,10 @@ Note patch is larger than strictly necessary due to autogenerated code +1: markt -1: + +* Additional patch from https://issues.apache.org/bugzilla/show_bug.cgi?id=43094 + Allow configuration of JSSE providers + Based on a patch by Bruno Harbulot + http://svn.apache.org/viewvc?rev=657449&view=rev + +1: markt + -1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 43094] Allowing non-file based keystore and other providers
https://issues.apache.org/bugzilla/show_bug.cgi?id=43094 --- Comment #6 from Mark Thomas <[EMAIL PROTECTED]> 2008-05-17 12:58:16 PST --- I have committed a modified version of the provider patch to trunk 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]