From 2178fabdb4947a7714871c9c56726b849263604a Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 11 Jan 2012 12:40:54 +0200 Subject: [PATCH] Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). --- add_entity_resolver_setter.patch | 19 +++++++++++++++++++ tomcat.spec | 9 +++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 add_entity_resolver_setter.patch diff --git a/add_entity_resolver_setter.patch b/add_entity_resolver_setter.patch new file mode 100644 index 0000000..8a3f8a7 --- /dev/null +++ b/add_entity_resolver_setter.patch @@ -0,0 +1,19 @@ +--- java/org/apache/jasper/xmlparser/ParserUtils.java.sav 2012-01-11 12:19:05.303081671 +0200 ++++ java/org/apache/jasper/xmlparser/ParserUtils.java 2012-01-11 12:25:32.327526734 +0200 +@@ -132,6 +132,16 @@ public class ParserUtils { + + return (parseXMLDocument(uri, new InputSource(is))); + } ++ ++ /** ++ * Set the EntityResolver. ++ * This is needed when the dtds and Jasper itself are in different classloaders (e.g. OSGi environment). ++ * ++ * @parem er EntityResolver to use. ++ */ ++ public static void setEntityResolver(EntityResolver er) { ++ entityResolver = er; ++ } + + + // ------------------------------------------------------ Protected Methods diff --git a/tomcat.spec b/tomcat.spec index cc6325f..4171f42 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -80,6 +80,8 @@ Source16: tomcat-juli-OSGi-MANIFEST.MF Source17: %{name}-%{major_version}.%{minor_version}-tomcat-sysd Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +#https://issues.apache.org/bugzilla/show_bug.cgi?id=52450 +Patch2: add_entity_resolver_setter.patch BuildArch: noarch @@ -226,7 +228,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -# %patch2 -p0 +%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -615,6 +617,9 @@ fi %{_initrddir}/%{name} %changelog +* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 +- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). + * Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 - Updated to 7.0.23