Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
i just tested this under 7.0.52 that should have the fix (from 51 on according to the change log) but its still this: (if i look into apache-tomcat-7.0.52-src.zip) private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = ServletContext.class.getResource(jsp/resources/ + url); } return id.toExternalForm(); } so it still fails for me. On 22 January 2014 13:02, Mark Thomas ma...@apache.org wrote: On 22/01/2014 11:56, Johan Compagner wrote: this is because tomcat expects that the 2 jars servlet-api.jar and jsp-api.jar are in the same classloader https://issues.apache.org/bugzilla/show_bug.cgi?id=56016 http://svn.us.apache.org/repos/asf/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Johan Compagner Servoy
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
On 27/02/2014 10:58, Johan Compagner wrote: i just tested this under 7.0.52 that should have the fix (from 51 on according to the change log) but its still this: (if i look into apache-tomcat-7.0.52-src.zip) Still what? The code you quote below is the code from 7.0.52 which is not the same as the code in 7.0.50. The 7.0.52 code is only looking at resources from the JAR that the ServletContext class is located in. private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = ServletContext.class.getResource(jsp/resources/ + url); } return id.toExternalForm(); } so it still fails for me. How does it fail? Are you sure you are using 7.0.52? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
i download here: http://archive.apache.org/dist/tomcat/tomcat-7/ .50 and .52 i look into org.apache.tomcat.util.descriptor.DigesterFactory those 2 files are for the piece that is wrong exactly the same for me: private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = ServletContext.class.getResource(jsp/resources/ + url); } return id.toExternalForm(); } both have that, but it should be: private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = JspContext.class.getResource(resources/ + url); } return id.toExternalForm(); } i need to patch this before it works for me (because we are running tomcat also in a OSGI enviroment and then jsp-api and servlet-api jars are not the same classloader They are bundles of there own. So you can't load jsp related xml files (from the jsp-api jar) through the ServletContext.class the id == null for me johan On 27 February 2014 12:07, Mark Thomas ma...@apache.org wrote: On 27/02/2014 10:58, Johan Compagner wrote: i just tested this under 7.0.52 that should have the fix (from 51 on according to the change log) but its still this: (if i look into apache-tomcat-7.0.52-src.zip) Still what? The code you quote below is the code from 7.0.52 which is not the same as the code in 7.0.50. The 7.0.52 code is only looking at resources from the JAR that the ServletContext class is located in. private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = ServletContext.class.getResource(jsp/resources/ + url); } return id.toExternalForm(); } so it still fails for me. How does it fail? Are you sure you are using 7.0.52? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Johan Compagner Servoy
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
On 27/02/2014 13:58, Johan Compagner wrote: i download here: http://archive.apache.org/dist/tomcat/tomcat-7/ .50 and .52 i look into org.apache.tomcat.util.descriptor.DigesterFactory those 2 files are for the piece that is wrong exactly the same for me: private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = ServletContext.class.getResource(jsp/resources/ + url); } return id.toExternalForm(); } both have that, but it should be: private static String idFor(String url) { URL id = ServletContext.class.getResource(resources/ + url); if (id == null) { id = JspContext.class.getResource(resources/ + url); } return id.toExternalForm(); } Sorry, I got confused about what changed between which 7.0.x and 8.0.x versions. There was a lot of rapid changes over a short period of time as folks reported different issues. The solution you propose is not acceptable as it causes other problems: https://issues.apache.org/bugzilla/show_bug.cgi?id=56045 The solution in 7.0.x (and released in 7.0.51) was to place all of the necessary schema in the Servlet JAR. i need to patch this before it works for me (because we are running tomcat also in a OSGI enviroment and then jsp-api and servlet-api jars are not the same classloader They are bundles of there own. So you can't load jsp related xml files (from the jsp-api jar) through the ServletContext.class the id == null for me What code path is trying to load JSP XML files from jsp-api.jar? Tomcat should be loading them all from servlet-api.jar Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
On 27 February 2014 15:16, Mark Thomas ma...@apache.org wrote: Sorry, I got confused about what changed between which 7.0.x and 8.0.x versions. There was a lot of rapid changes over a short period of time as folks reported different issues. The solution you propose is not acceptable as it causes other problems: https://issues.apache.org/bugzilla/show_bug.cgi?id=56045 The solution in 7.0.x (and released in 7.0.51) was to place all of the necessary schema in the Servlet JAR. i need to patch this before it works for me (because we are running tomcat also in a OSGI enviroment and then jsp-api and servlet-api jars are not the same classloader They are bundles of there own. So you can't load jsp related xml files (from the jsp-api jar) through the ServletContext.class the id == null for me What code path is trying to load JSP XML files from jsp-api.jar? Tomcat should be loading them all from servlet-api.jar ahh the servlet-api.jar that now ships with tomcat has now also a copy of the same resources the jsp-api.jar also has So the if (id == null) { id = JspContext.class.getResource(resources/ + url); } should never be hit anymore in a real tomcat install The problem why i still have it is because i use a servlet-api bundle osgi bundle not coming from tomcat. (i would need to patch the manifest file to be able to use it as a real osgi bundle in eclipse) But i understand now that the fix was differently applied and why i still had problems with it. (tomcat kind of changed the standard, jsr api lib ;) ) johan -- Johan Compagner Servoy
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
On 27/02/2014 14:29, Johan Compagner wrote: On 27 February 2014 15:16, Mark Thomas ma...@apache.org wrote: Sorry, I got confused about what changed between which 7.0.x and 8.0.x versions. There was a lot of rapid changes over a short period of time as folks reported different issues. The solution you propose is not acceptable as it causes other problems: https://issues.apache.org/bugzilla/show_bug.cgi?id=56045 The solution in 7.0.x (and released in 7.0.51) was to place all of the necessary schema in the Servlet JAR. i need to patch this before it works for me (because we are running tomcat also in a OSGI enviroment and then jsp-api and servlet-api jars are not the same classloader They are bundles of there own. So you can't load jsp related xml files (from the jsp-api jar) through the ServletContext.class the id == null for me What code path is trying to load JSP XML files from jsp-api.jar? Tomcat should be loading them all from servlet-api.jar ahh the servlet-api.jar that now ships with tomcat has now also a copy of the same resources the jsp-api.jar also has So the if (id == null) { id = JspContext.class.getResource(resources/ + url); } should never be hit anymore in a real tomcat install The problem why i still have it is because i use a servlet-api bundle osgi bundle not coming from tomcat. (i would need to patch the manifest file to be able to use it as a real osgi bundle in eclipse) But i understand now that the fix was differently applied and why i still had problems with it. (tomcat kind of changed the standard, jsr api lib ;) ) I'd argue that a servlet-api.jar that doesn't include the JSP XML schemas is broken (which is why we changed it) since: - Servlet has no declared dependency on JSP - You can't validate XML documents against the schemas used by the Servlet spec without the JSP schemas Therefore the JSP schemas have to be included in the servlet-api.jar Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
On 22/01/2014 11:56, Johan Compagner wrote: this is because tomcat expects that the 2 jars servlet-api.jar and jsp-api.jar are in the same classloader https://issues.apache.org/bugzilla/show_bug.cgi?id=56016 http://svn.us.apache.org/repos/asf/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the latest tomcat 7.0.50 has a problem when used through osgi (like eclipse)
thx :) On 22 January 2014 13:02, Mark Thomas ma...@apache.org wrote: On 22/01/2014 11:56, Johan Compagner wrote: this is because tomcat expects that the 2 jars servlet-api.jar and jsp-api.jar are in the same classloader https://issues.apache.org/bugzilla/show_bug.cgi?id=56016 http://svn.us.apache.org/repos/asf/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Johan Compagner Servoy