[pkg-java] r18606 - trunk/easyconf/debian/patches

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Nov 19 16:30:44 GMT 2014


Author: ebourg-guest
Date: 2014-11-19 16:30:37 +0000 (Wed, 19 Nov 2014)
New Revision: 18606

Added:
   trunk/easyconf/debian/patches/disable-struts-support.diff
Log:
Added the Struts patch



Added: trunk/easyconf/debian/patches/disable-struts-support.diff
===================================================================
--- trunk/easyconf/debian/patches/disable-struts-support.diff	                        (rev 0)
+++ trunk/easyconf/debian/patches/disable-struts-support.diff	2014-11-19 16:30:37 UTC (rev 18606)
@@ -0,0 +1,60 @@
+--- a/build.xml
++++ b/build.xml
+@@ -33,7 +33,7 @@
+   <target name="compile" description="o Compile the code" depends="get-deps">
+     <mkdir dir="${classesdir}">
+     </mkdir>
+-    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
++    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html,**/struts/**">
+       <src>
+         <pathelement location="src/java">
+         </pathelement>
+--- a/src/java/com/germinus/easyconf/taglib/PropertyTag.java
++++ b/src/java/com/germinus/easyconf/taglib/PropertyTag.java
+@@ -21,7 +21,7 @@
+ 
+ import javax.servlet.jsp.tagext.BodyTagSupport;
+ import javax.servlet.jsp.JspException;
+-import org.apache.struts.util.RequestUtils;
++import javax.servlet.jsp.PageContext;
+ import org.apache.commons.lang.StringUtils;
+ 
+ import java.util.List;
+@@ -252,7 +252,7 @@
+        
+         if (value == null) {
+             JspException e = new JspException("The value of the property is null");
+-            RequestUtils.saveException(pageContext, e);
++            pageContext.setAttribute("org.apache.struts.action.EXCEPTION", e, PageContext.REQUEST_SCOPE);
+             throw e;
+         }
+         pageContext.setAttribute(id, value);
+@@ -292,7 +292,7 @@
+             value = new Long(conf.getLong(property, getPropertyFilter()));
+         } else {
+                 JspException e = new JspException("Unsupported type: " +type);
+-                RequestUtils.saveException(pageContext, e);
++                pageContext.setAttribute("org.apache.struts.action.EXCEPTION", e, PageContext.REQUEST_SCOPE);
+                 throw e;
+         }
+         return value;
+--- a/src/java/com/germinus/easyconf/taglib/ConfigurationObjectTag.java
++++ b/src/java/com/germinus/easyconf/taglib/ConfigurationObjectTag.java
+@@ -18,7 +18,7 @@
+ import com.germinus.easyconf.EasyConf;
+ import javax.servlet.jsp.tagext.BodyTagSupport;
+ import javax.servlet.jsp.JspException;
+-import org.apache.struts.util.RequestUtils;
++import javax.servlet.jsp.PageContext;
+ 
+ 
+ 
+@@ -110,7 +110,7 @@
+         if (confObj == null) {
+             JspException e = new JspException("The value of the configuration object is null. " +
+             		"Check the configuration files");
+-            RequestUtils.saveException(pageContext, e);
++            pageContext.setAttribute("org.apache.struts.action.EXCEPTION", e, PageContext.REQUEST_SCOPE);
+             throw e;
+         }
+         pageContext.setAttribute(id, confObj);




More information about the pkg-java-commits mailing list