From: <del...@us...> - 2012-01-29 13:49:23
|
Revision: 15753 http://exist.svn.sourceforge.net/exist/?rev=15753&view=rev Author: deliriumsky Date: 2012-01-29 13:49:15 +0000 (Sun, 29 Jan 2012) Log Message: ----------- [ignore] merge in of trunk Modified Paths: -------------- branches/adam/eXist-security-refinements/extensions/betterform/main/etc/MergeWebXML.xsl branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ControllerForward.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Forward.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ModuleCall.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PassThrough.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PathForward.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Redirect.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/RewriteConfig.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/URLRewrite.java branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/XQueryURLRewrite.java branches/adam/eXist-security-refinements/test/src/org/exist/http/urlrewrite/URLRewriteTest.java branches/adam/eXist-security-refinements/webapp/WEB-INF/web.xml.tmpl Property Changed: ---------------- branches/adam/eXist-security-refinements/ branches/adam/eXist-security-refinements/bin/functions.d/jmx-settings.sh branches/adam/eXist-security-refinements/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java branches/adam/eXist-security-refinements/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java branches/adam/eXist-security-refinements/lib/optional/axis-schema-1.3.jar branches/adam/eXist-security-refinements/lib/optional/jaxrpc-1.1.jar branches/adam/eXist-security-refinements/lib/optional/saaj-1.2.jar branches/adam/eXist-security-refinements/lib/user/activation-1.1.1.jar branches/adam/eXist-security-refinements/src/org/exist/dom/ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ branches/adam/eXist-security-refinements/src/org/exist/indexing/ branches/adam/eXist-security-refinements/src/org/exist/numbering/ branches/adam/eXist-security-refinements/src/org/exist/storage/ branches/adam/eXist-security-refinements/src/org/exist/storage/BrokerWatchdog.java branches/adam/eXist-security-refinements/src/org/exist/storage/ConsistencyCheckTask.java branches/adam/eXist-security-refinements/src/org/exist/storage/DBBroker.java branches/adam/eXist-security-refinements/src/org/exist/storage/NativeBroker.java branches/adam/eXist-security-refinements/src/org/exist/storage/StorageAddress.java branches/adam/eXist-security-refinements/src/org/exist/storage/btree/ branches/adam/eXist-security-refinements/src/org/exist/storage/dom/ branches/adam/eXist-security-refinements/src/org/exist/storage/index/ branches/adam/eXist-security-refinements/src/org/exist/storage/report/ branches/adam/eXist-security-refinements/src/org/exist/storage/txn/ branches/adam/eXist-security-refinements/src/org/exist/xquery/LocationStep.java branches/adam/eXist-security-refinements/src/org/exist/xquery/pragmas/Optimize.java branches/adam/eXist-security-refinements/test/src/org/exist/dom/BasicNodeSetTest.java branches/adam/eXist-security-refinements/test/src/org/exist/fulltext/FTIndexTest.java branches/adam/eXist-security-refinements/test/src/org/exist/xquery/OptimizerTest.java branches/adam/eXist-security-refinements/tools/Solaris/ branches/adam/eXist-security-refinements/tools/jetty/etc/standalone/WEB-INF/ Property changes on: branches/adam/eXist-security-refinements ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl:14123-14668 /branches/adam/security-locking:15302-15345 /branches/dizzzz/xquery3:15611-15682 /branches/jmfg/res64-eXist:12887-13224 /trunk/eXist:15143-15748 /trunk/eXist/nbproject:8007-14504 + /branches/adam/eXist-acl:14123-14668 /branches/adam/security-locking:15302-15345 /branches/dizzzz/xquery3:15611-15682 /branches/jmfg/res64-eXist:12887-13224 /trunk/eXist:15143-15752 /trunk/eXist/nbproject:8007-14504 Property changes on: branches/adam/eXist-security-refinements/bin/functions.d/jmx-settings.sh ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/bin/functions.d/jmx-settings.sh:14123-14668 /branches/jmfg/res64-eXist/bin/functions.d/jmx-settings.sh:12887-13224 /trunk/eXist/bin/functions.d/jmx-settings.sh:15143-15748 /trunk/eXist/nbproject/bin/functions.d/jmx-settings.sh:8007-14504 + /branches/adam/eXist-acl/bin/functions.d/jmx-settings.sh:14123-14668 /branches/jmfg/res64-eXist/bin/functions.d/jmx-settings.sh:12887-13224 /trunk/eXist/bin/functions.d/jmx-settings.sh:15143-15752 /trunk/eXist/nbproject/bin/functions.d/jmx-settings.sh:8007-14504 Modified: branches/adam/eXist-security-refinements/extensions/betterform/main/etc/MergeWebXML.xsl =================================================================== --- branches/adam/eXist-security-refinements/extensions/betterform/main/etc/MergeWebXML.xsl 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/extensions/betterform/main/etc/MergeWebXML.xsl 2012-01-29 13:49:15 UTC (rev 15753) @@ -31,23 +31,6 @@ </context-param> </xsl:template> <xsl:template match="/webxml:web-app/webxml:filter[last()]"> - <xsl:comment>XForms Filter</xsl:comment> - <xsl:text> - -</xsl:text> - <filter> - <filter-name>XFormsFilter</filter-name> - <filter-class> - de.betterform.agent.web.filter.XFormsFilter</filter-class> - <init-param> - <param-name>useragent</param-name> - <param-value>dojo</param-value> - </init-param> - </filter> - <xsl:text> - -</xsl:text> - <xsl:copy-of select="." /> </xsl:template> <xsl:template match="/webxml:web-app/webxml:servlet[last()]"> <xsl:copy-of select="." /> @@ -85,12 +68,27 @@ <servlet-class> de.betterform.agent.web.resources.ResourceServlet</servlet-class> </servlet> - </xsl:template> - <xsl:template match="/webxml:web-app/webxml:filter-mapping[webxml:filter-name/text()='XQueryURLRewrite']"> - - <xsl:text></xsl:text> - - + <xsl:copy-of select="." /> + <xsl:text> + + </xsl:text> + + <xsl:comment>XForms Filter</xsl:comment> + <xsl:text> + +</xsl:text> + <filter> + <filter-name>XFormsFilter</filter-name> + <filter-class> + de.betterform.agent.web.filter.XFormsFilter</filter-class> + <init-param> + <param-name>useragent</param-name> + <param-value>dojo</param-value> + </init-param> + </filter> + <xsl:text> + +</xsl:text> <filter-mapping> <filter-name>XFormsFilter</filter-name> <url-pattern>/rest/db/*</url-pattern> @@ -102,10 +100,6 @@ <xsl:text> </xsl:text> - <xsl:copy-of select="." /> - <xsl:text> - -</xsl:text> <xsl:comment>betterFORM Flux Servlet Mapping</xsl:comment> <xsl:text> @@ -134,6 +128,7 @@ <servlet-name>ResourceServlet</servlet-name> <url-pattern>/bfResources/*</url-pattern> </servlet-mapping> + <xsl:copy-of select="." /> </xsl:template> <xsl:template match="node()|@*"> <xsl:copy> Property changes on: branches/adam/eXist-security-refinements/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:14123-14668 /branches/jmfg/res64-eXist/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:12887-13224 /trunk/eXist/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:15143-15748 /trunk/eXist/nbproject/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:8007-14504 + /branches/adam/eXist-acl/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:14123-14668 /branches/jmfg/res64-eXist/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:12887-13224 /trunk/eXist/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:15143-15752 /trunk/eXist/nbproject/extensions/expath/src/org/expath/exist/ZipEntryFunctions.java:8007-14504 Property changes on: branches/adam/eXist-security-refinements/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:14123-14668 /branches/adam/security-locking/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:15302-15345 /trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:15143-15748 /trunk/eXist/nbproject/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:8007-14504 + /branches/adam/eXist-acl/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:14123-14668 /branches/adam/security-locking/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:15302-15345 /trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:15143-15752 /trunk/eXist/nbproject/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeCharting.java:8007-14504 Property changes on: branches/adam/eXist-security-refinements/lib/optional/axis-schema-1.3.jar ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/lib/optional/axis-schema-1.3.jar:14123-14668 /branches/adam/security-locking/lib/optional/axis-schema-1.3.jar:15302-15345 /trunk/eXist/lib/optional/axis-schema-1.3.jar:15143-15748 /trunk/eXist/nbproject/lib/optional/axis-schema-1.3.jar:8007-14504 + /branches/adam/eXist-acl/lib/optional/axis-schema-1.3.jar:14123-14668 /branches/adam/security-locking/lib/optional/axis-schema-1.3.jar:15302-15345 /trunk/eXist/lib/optional/axis-schema-1.3.jar:15143-15752 /trunk/eXist/nbproject/lib/optional/axis-schema-1.3.jar:8007-14504 Property changes on: branches/adam/eXist-security-refinements/lib/optional/jaxrpc-1.1.jar ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/lib/optional/jaxrpc-1.1.jar:14123-14668 /branches/adam/security-locking/lib/optional/jaxrpc-1.1.jar:15302-15345 /trunk/eXist/lib/optional/jaxrpc-1.1.jar:15143-15748 /trunk/eXist/nbproject/lib/optional/jaxrpc-1.1.jar:8007-14504 + /branches/adam/eXist-acl/lib/optional/jaxrpc-1.1.jar:14123-14668 /branches/adam/security-locking/lib/optional/jaxrpc-1.1.jar:15302-15345 /trunk/eXist/lib/optional/jaxrpc-1.1.jar:15143-15752 /trunk/eXist/nbproject/lib/optional/jaxrpc-1.1.jar:8007-14504 Property changes on: branches/adam/eXist-security-refinements/lib/optional/saaj-1.2.jar ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/lib/optional/saaj-1.2.jar:14123-14668 /branches/adam/security-locking/lib/optional/saaj-1.2.jar:15302-15345 /trunk/eXist/lib/optional/saaj-1.2.jar:15143-15748 /trunk/eXist/nbproject/lib/optional/saaj-1.2.jar:8007-14504 + /branches/adam/eXist-acl/lib/optional/saaj-1.2.jar:14123-14668 /branches/adam/security-locking/lib/optional/saaj-1.2.jar:15302-15345 /trunk/eXist/lib/optional/saaj-1.2.jar:15143-15752 /trunk/eXist/nbproject/lib/optional/saaj-1.2.jar:8007-14504 Property changes on: branches/adam/eXist-security-refinements/lib/user/activation-1.1.1.jar ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/lib/user/activation-1.1.1.jar:14123-14668 /branches/adam/security-locking/lib/user/activation-1.1.1.jar:15302-15345 /trunk/eXist/lib/user/activation-1.1.1.jar:15143-15748 /trunk/eXist/nbproject/lib/user/activation-1.1.1.jar:8007-14504 + /branches/adam/eXist-acl/lib/user/activation-1.1.1.jar:14123-14668 /branches/adam/security-locking/lib/user/activation-1.1.1.jar:15302-15345 /trunk/eXist/lib/user/activation-1.1.1.jar:15143-15752 /trunk/eXist/nbproject/lib/user/activation-1.1.1.jar:8007-14504 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/dom ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/dom:14123-14668 /branches/adam/security-locking/src/org/exist/dom:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/dom:12887-13224 /branches/wolfgang/src/org/exist/dom:10658-11213 /stable/eXist-1.4.x/src/org/exist/dom:11626 /trunk/eXist/nbproject/src/org/exist/dom:8007-14504 /trunk/eXist/src/org/exist/dom:15143-15748 + /branches/adam/eXist-acl/src/org/exist/dom:14123-14668 /branches/adam/security-locking/src/org/exist/dom:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/dom:12887-13224 /branches/wolfgang/src/org/exist/dom:10658-11213 /stable/eXist-1.4.x/src/org/exist/dom:11626 /trunk/eXist/nbproject/src/org/exist/dom:8007-14504 /trunk/eXist/src/org/exist/dom:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/eXist/src/org/exist/http/urlrewrite:15143-15748 + /trunk/eXist/src/org/exist/http/urlrewrite:15143-15752 Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ControllerForward.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ControllerForward.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ControllerForward.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -55,7 +55,7 @@ } @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + public void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } @Override Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Forward.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Forward.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Forward.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -23,28 +23,39 @@ import java.io.IOException; -import javax.servlet.FilterChain; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.log4j.Logger; import org.exist.http.servlets.HttpResponseWrapper; import org.w3c.dom.Element; public abstract class Forward extends URLRewrite { - protected Forward(Element config, String uri) { + private static final Logger LOG = Logger.getLogger(Forward.class); + + protected Forward(Element config, String uri) { super(config, uri); } @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + public void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + Object flag = request.getAttribute("XQueryURLRewrite.forward"); + if (uri.equals(flag)) { + LOG.error("Request to " + uri + " already forwarded from " + flag); + return; + } + + request.setAttribute("XQueryURLRewrite.forward", uri); + RequestDispatcher dispatcher = getRequestDispatcher(request); if (dispatcher == null) throw new ServletException("Failed to initialize request dispatcher to forward request to " + uri); setHeaders(new HttpResponseWrapper(response)); dispatcher.forward(request, response); + } protected abstract RequestDispatcher getRequestDispatcher(HttpServletRequest request); Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ModuleCall.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ModuleCall.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/ModuleCall.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -78,7 +78,7 @@ } @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) + public void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Sequence result = call.eval(null); Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PassThrough.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PassThrough.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PassThrough.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -21,31 +21,31 @@ */ package org.exist.http.urlrewrite; -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.ServletException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.exist.http.servlets.HttpResponseWrapper; import org.w3c.dom.Element; -public class PassThrough extends URLRewrite { +public class PassThrough extends Forward { - public PassThrough(HttpServletRequest request) { + private ServletConfig servletConfig; + + public PassThrough(ServletConfig servletConfig, HttpServletRequest request) { super(null, request.getRequestURI()); + this.servletConfig = servletConfig; this.target = request.getRequestURI().substring(request.getContextPath().length()); } - public PassThrough(Element config, HttpServletRequest request) { + public PassThrough(ServletConfig servletConfig, Element config, HttpServletRequest request) { super(config, request.getRequestURI()); + this.servletConfig = servletConfig; this.target = request.getRequestURI().substring(request.getContextPath().length()); } - @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { - setHeaders(new HttpResponseWrapper(response)); - chain.doFilter(request, response); - } -} + @Override + protected RequestDispatcher getRequestDispatcher(HttpServletRequest request) { + // always forward to the servlet engine's default servlet + return servletConfig.getServletContext().getNamedDispatcher("default"); + } +} \ No newline at end of file Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PathForward.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PathForward.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/PathForward.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -26,15 +26,16 @@ import javax.servlet.RequestDispatcher; import javax.servlet.FilterConfig; +import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; public class PathForward extends Forward { - private FilterConfig filterConfig; + private ServletConfig filterConfig; private String servletName = null; - public PathForward(FilterConfig filterConfig, Element config, String uri) throws ServletException { + public PathForward(ServletConfig filterConfig, Element config, String uri) throws ServletException { super(config, uri); this.filterConfig = filterConfig; servletName = config.getAttribute("servlet"); Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Redirect.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Redirect.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/Redirect.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -44,7 +44,7 @@ } @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + public void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { setHeaders(new HttpResponseWrapper(response)); response.sendRedirect(target); } Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/RewriteConfig.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/RewriteConfig.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/RewriteConfig.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -20,6 +20,7 @@ import org.xml.sax.XMLReader; import javax.servlet.FilterConfig; +import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.xml.parsers.ParserConfigurationException; @@ -236,7 +237,7 @@ } } - private URLRewrite parseAction(FilterConfig config, String pattern, Element action) throws ServletException { + private URLRewrite parseAction(ServletConfig config, String pattern, Element action) throws ServletException { URLRewrite rewrite = null; if ("forward".equals(action.getLocalName())) { rewrite = new PathForward(config, action, pattern); Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/URLRewrite.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/URLRewrite.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/URLRewrite.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -196,8 +196,7 @@ return prefix; } - public abstract void doRewrite(HttpServletRequest request, HttpServletResponse response, - FilterChain chain) throws ServletException, IOException; + public abstract void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException; public void prepareRequest(XQueryURLRewrite.RequestWrapper request) { if (parameters != null) { Modified: branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/XQueryURLRewrite.java =================================================================== --- branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -79,12 +79,14 @@ import javax.servlet.Filter; import javax.servlet.FilterConfig; +import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.FilterChain; import javax.servlet.ServletOutputStream; import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponseWrapper; @@ -106,7 +108,7 @@ import java.util.regex.Matcher; /** - * A filter to redirect HTTP requests. Similar to the popular UrlRewriteFilter, but + * A servlet to redirect HTTP requests. Similar to the popular UrlRewriteFilter, but * based on XQuery. * * The request is passed to an XQuery whose return value determines where the request will be @@ -120,7 +122,7 @@ * * Please read the <a href="http://exist-db.org/urlrewrite.html">documentation</a> for further information. */ -public class XQueryURLRewrite implements Filter { +public class XQueryURLRewrite extends HttpServlet { private static final Logger LOG = Logger.getLogger(XQueryURLRewrite.class); @@ -135,7 +137,7 @@ private final static Pattern NAME_REGEX = Pattern.compile("^.*/([^/]+)$", 0); - private FilterConfig config; + private ServletConfig config; private final Map<String, ModelAndView> urlCache = new ConcurrentHashMap<String, ModelAndView>(); @@ -152,7 +154,7 @@ private RewriteConfig rewriteConfig; @Override - public void init(FilterConfig filterConfig) throws ServletException { + public void init(ServletConfig filterConfig) throws ServletException { // save FilterConfig for later use this.config = filterConfig; @@ -169,7 +171,7 @@ } @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + protected void service(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws IOException, ServletException { if (rewriteConfig == null) { configure(); rewriteConfig = new RewriteConfig(this); @@ -211,7 +213,7 @@ modifiedRequest.setPaths(staticRewrite.resolve(modifiedRequest), staticRewrite.getPrefix()); if (LOG.isTraceEnabled()) LOG.trace("Forwarding to target: " + staticRewrite.getTarget()); - staticRewrite.doRewrite(modifiedRequest, response, filterChain); + staticRewrite.doRewrite(modifiedRequest, response); } else { if (LOG.isTraceEnabled()) LOG.trace("Processing request URI: " + request.getRequestURI()); @@ -291,9 +293,9 @@ node = node.getNextSibling(); } if (modelView.getModel() == null) - modelView.setModel(new PassThrough(elem, modifiedRequest)); + modelView.setModel(new PassThrough(config, elem, modifiedRequest)); } else if (Namespaces.EXIST_NS.equals(elem.getNamespaceURI()) && "ignore".equals(elem.getLocalName())) { - modelView.setModel(new PassThrough(elem, modifiedRequest)); + modelView.setModel(new PassThrough(config, elem, modifiedRequest)); NodeList nl = elem.getElementsByTagNameNS(Namespaces.EXIST_NS, "cache-control"); if (nl.getLength() > 0) { elem = (Element) nl.item(0); @@ -327,7 +329,7 @@ HttpServletResponse wrappedResponse = new CachingResponseWrapper(response, modelView.hasViews() || modelView.hasErrorHandlers()); if (modelView.getModel() == null) - modelView.setModel(new PassThrough(modifiedRequest)); + modelView.setModel(new PassThrough(config, modifiedRequest)); if (staticRewrite != null) { if (modelView.getModel().doResolve()) @@ -336,7 +338,7 @@ modelView.getModel().setAbsolutePath(modifiedRequest); } modifiedRequest.allowCaching(!modelView.hasViews()); - doRewrite(modelView.getModel(), modifiedRequest, wrappedResponse, filterChain); + doRewrite(modelView.getModel(), modifiedRequest, wrappedResponse); int status = ((CachingResponseWrapper) wrappedResponse).getStatus(); if (status == HttpServletResponse.SC_NOT_MODIFIED) { @@ -408,7 +410,7 @@ wrappedReq.setData(data); wrappedResponse = new CachingResponseWrapper(response, true); - doRewrite(view, wrappedReq, wrappedResponse, null); + doRewrite(view, wrappedReq, wrappedResponse); // catch errors in the view status = ((CachingResponseWrapper) wrappedResponse).getStatus(); @@ -536,8 +538,7 @@ * @throws IOException * @throws ServletException */ - protected void doRewrite(URLRewrite action, RequestWrapper request, HttpServletResponse response, - FilterChain filterChain) throws IOException, ServletException { + protected void doRewrite(URLRewrite action, RequestWrapper request, HttpServletResponse response) throws IOException, ServletException { if (action.getTarget() != null && !(action instanceof Redirect)) { String uri = action.resolve(request); URLRewrite staticRewrite = rewriteConfig.lookup(uri, request.getServerName(), true); @@ -553,10 +554,10 @@ } } action.prepareRequest(request); - action.doRewrite(request, response, filterChain); + action.doRewrite(request, response); } - protected FilterConfig getConfig() { + protected ServletConfig getConfig() { return config; } Property changes on: branches/adam/eXist-security-refinements/src/org/exist/indexing ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/indexing:14123-14668 /branches/adam/security-locking/src/org/exist/indexing:15302-15345 /branches/wolfgang/src/org/exist/indexing:10658-11213 /trunk/eXist/nbproject/src/org/exist/indexing:8007-14504 /trunk/eXist/src/org/exist/indexing:15143-15748 + /branches/adam/eXist-acl/src/org/exist/indexing:14123-14668 /branches/adam/security-locking/src/org/exist/indexing:15302-15345 /branches/wolfgang/src/org/exist/indexing:10658-11213 /trunk/eXist/nbproject/src/org/exist/indexing:8007-14504 /trunk/eXist/src/org/exist/indexing:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/numbering ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/numbering:14123-14668 /branches/adam/security-locking/src/org/exist/numbering:15302-15345 /branches/wolfgang/src/org/exist/numbering:10658-11213 /trunk/eXist/nbproject/src/org/exist/numbering:8007-14504 /trunk/eXist/src/org/exist/numbering:15143-15748 + /branches/adam/eXist-acl/src/org/exist/numbering:14123-14668 /branches/adam/security-locking/src/org/exist/numbering:15302-15345 /branches/wolfgang/src/org/exist/numbering:10658-11213 /trunk/eXist/nbproject/src/org/exist/numbering:8007-14504 /trunk/eXist/src/org/exist/numbering:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage:14123-14668 /branches/adam/security-locking/src/org/exist/storage:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage:12887-13224 /branches/wolfgang/src/org/exist/storage/structural:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage:8007-14504 /trunk/eXist/src/org/exist/storage:15143-15748 /trunk/eXist/src/org/exist/storage/structural:10658-10832*,10875-11212 + /branches/adam/eXist-acl/src/org/exist/storage:14123-14668 /branches/adam/security-locking/src/org/exist/storage:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage:12887-13224 /branches/wolfgang/src/org/exist/storage/structural:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage:8007-14504 /trunk/eXist/src/org/exist/storage:15143-15752 /trunk/eXist/src/org/exist/storage/structural:10658-10832*,10875-11212 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/BrokerWatchdog.java ___________________________________________________________________ Deleted: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/BrokerWatchdog.java:14123-14668 /branches/jmfg/res64-eXist/src/org/exist/storage/BrokerWatchdog.java:12887-13224 /branches/wolfgang/src/org/exist/storage/structural/BrokerWatchdog.java:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage/BrokerWatchdog.java:8007-14504 /trunk/eXist/src/org/exist/storage/BrokerWatchdog.java:15143-15513 /trunk/eXist/src/org/exist/storage/structural/BrokerWatchdog.java:10875-11212 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/ConsistencyCheckTask.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/ConsistencyCheckTask.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/ConsistencyCheckTask.java:15302-15345 /branches/adam/t2/src/org/exist/storage/ConsistencyCheckTask.java:8802-9013 /branches/eXist-stable-1.2/src/org/exist/storage/ConsistencyCheckTask.java:9415,10309 /stable/eXist-1.4.x/src/org/exist/storage/ConsistencyCheckTask.java:10999 /trunk/eXist/nbproject/src/org/exist/storage/ConsistencyCheckTask.java:8007-14504 /trunk/eXist/src/org/exist/storage/ConsistencyCheckTask.java:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/ConsistencyCheckTask.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/ConsistencyCheckTask.java:15302-15345 /branches/adam/t2/src/org/exist/storage/ConsistencyCheckTask.java:8802-9013 /branches/eXist-stable-1.2/src/org/exist/storage/ConsistencyCheckTask.java:9415,10309 /stable/eXist-1.4.x/src/org/exist/storage/ConsistencyCheckTask.java:10999 /trunk/eXist/nbproject/src/org/exist/storage/ConsistencyCheckTask.java:8007-14504 /trunk/eXist/src/org/exist/storage/ConsistencyCheckTask.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/DBBroker.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/DBBroker.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/DBBroker.java:15302-15345 /branches/wolfgang/src/org/exist/storage/DBBroker.java:10658-11213 /branches/wolfgang/src/org/exist/storage/structural/DBBroker.java:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage/DBBroker.java:8007-14504 /trunk/eXist/src/org/exist/storage/DBBroker.java:15143-15748 /trunk/eXist/src/org/exist/storage/structural/DBBroker.java:10875-11212 + /branches/adam/eXist-acl/src/org/exist/storage/DBBroker.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/DBBroker.java:15302-15345 /branches/wolfgang/src/org/exist/storage/DBBroker.java:10658-11213 /branches/wolfgang/src/org/exist/storage/structural/DBBroker.java:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage/DBBroker.java:8007-14504 /trunk/eXist/src/org/exist/storage/DBBroker.java:15143-15752 /trunk/eXist/src/org/exist/storage/structural/DBBroker.java:10875-11212 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/NativeBroker.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/NativeBroker.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/NativeBroker.java:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage/NativeBroker.java:12887-13224 /branches/wolfgang/src/org/exist/storage/NativeBroker.java:10658-11213 /stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java:11893 /trunk/eXist/nbproject/src/org/exist/storage/NativeBroker.java:8007-14504 /trunk/eXist/src/org/exist/storage/NativeBroker.java:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/NativeBroker.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/NativeBroker.java:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage/NativeBroker.java:12887-13224 /branches/wolfgang/src/org/exist/storage/NativeBroker.java:10658-11213 /stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java:11893 /trunk/eXist/nbproject/src/org/exist/storage/NativeBroker.java:8007-14504 /trunk/eXist/src/org/exist/storage/NativeBroker.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/StorageAddress.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/StorageAddress.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/StorageAddress.java:15302-15345 /branches/wolfgang/src/org/exist/storage/StorageAddress.java:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/StorageAddress.java:8007-14504 /trunk/eXist/src/org/exist/storage/StorageAddress.java:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/StorageAddress.java:14123-14668 /branches/adam/security-locking/src/org/exist/storage/StorageAddress.java:15302-15345 /branches/wolfgang/src/org/exist/storage/StorageAddress.java:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/StorageAddress.java:8007-14504 /trunk/eXist/src/org/exist/storage/StorageAddress.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/btree ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/btree:14123-14668 /branches/adam/security-locking/src/org/exist/storage/btree:15302-15345 /branches/wolfgang/src/org/exist/storage/btree:10658-11213 /stable/eXist-1.4.x/src/org/exist/storage/btree:13335 /trunk/eXist/nbproject/src/org/exist/storage/btree:8007-14504 /trunk/eXist/src/org/exist/storage/btree:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/btree:14123-14668 /branches/adam/security-locking/src/org/exist/storage/btree:15302-15345 /branches/wolfgang/src/org/exist/storage/btree:10658-11213 /stable/eXist-1.4.x/src/org/exist/storage/btree:13335 /trunk/eXist/nbproject/src/org/exist/storage/btree:8007-14504 /trunk/eXist/src/org/exist/storage/btree:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/dom ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/dom:14123-14668 /branches/adam/security-locking/src/org/exist/storage/dom:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage/dom:12887-13224 /branches/wolfgang/src/org/exist/storage/dom:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/dom:8007-14504 /trunk/eXist/src/org/exist/storage/dom:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/dom:14123-14668 /branches/adam/security-locking/src/org/exist/storage/dom:15302-15345 /branches/jmfg/res64-eXist/src/org/exist/storage/dom:12887-13224 /branches/wolfgang/src/org/exist/storage/dom:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/dom:8007-14504 /trunk/eXist/src/org/exist/storage/dom:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/index ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/index:14123-14668 /branches/adam/security-locking/src/org/exist/storage/index:15302-15345 /branches/wolfgang/src/org/exist/storage/index:10658-11213 /branches/wolfgang/src/org/exist/storage/structural/index:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage/index:8007-14504 /trunk/eXist/src/org/exist/storage/index:15143-15748 /trunk/eXist/src/org/exist/storage/structural/index:10875-11212 + /branches/adam/eXist-acl/src/org/exist/storage/index:14123-14668 /branches/adam/security-locking/src/org/exist/storage/index:15302-15345 /branches/wolfgang/src/org/exist/storage/index:10658-11213 /branches/wolfgang/src/org/exist/storage/structural/index:10694-11213 /trunk/eXist/nbproject/src/org/exist/storage/index:8007-14504 /trunk/eXist/src/org/exist/storage/index:15143-15752 /trunk/eXist/src/org/exist/storage/structural/index:10875-11212 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/report ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/report:14123-14668 /branches/adam/security-locking/src/org/exist/storage/report:15302-15345 /branches/wolfgang/src/org/exist/storage/report:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/report:8007-14504 /trunk/eXist/src/org/exist/storage/report:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/report:14123-14668 /branches/adam/security-locking/src/org/exist/storage/report:15302-15345 /branches/wolfgang/src/org/exist/storage/report:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/report:8007-14504 /trunk/eXist/src/org/exist/storage/report:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/storage/txn ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/storage/txn:14123-14668 /branches/adam/security-locking/src/org/exist/storage/txn:15302-15345 /branches/wolfgang/src/org/exist/storage/structural/txn:10694-11213 /branches/wolfgang/src/org/exist/storage/txn:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/txn:8007-14504 /trunk/eXist/src/org/exist/storage/structural/txn:10875-11212 /trunk/eXist/src/org/exist/storage/txn:15143-15748 + /branches/adam/eXist-acl/src/org/exist/storage/txn:14123-14668 /branches/adam/security-locking/src/org/exist/storage/txn:15302-15345 /branches/wolfgang/src/org/exist/storage/structural/txn:10694-11213 /branches/wolfgang/src/org/exist/storage/txn:10658-11213 /trunk/eXist/nbproject/src/org/exist/storage/txn:8007-14504 /trunk/eXist/src/org/exist/storage/structural/txn:10875-11212 /trunk/eXist/src/org/exist/storage/txn:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/xquery/LocationStep.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/xquery/LocationStep.java:14123-14668 /branches/adam/eXist-xq3/src/org/exist/xquery/LocationStep.java:13010-13060 /branches/adam/security-locking/src/org/exist/xquery/LocationStep.java:15302-15345 /branches/wolfgang/src/org/exist/xquery/LocationStep.java:10658-11213 /trunk/eXist/nbproject/src/org/exist/xquery/LocationStep.java:8007-14504 /trunk/eXist/src/org/exist/xquery/LocationStep.java:15143-15748 + /branches/adam/eXist-acl/src/org/exist/xquery/LocationStep.java:14123-14668 /branches/adam/eXist-xq3/src/org/exist/xquery/LocationStep.java:13010-13060 /branches/adam/security-locking/src/org/exist/xquery/LocationStep.java:15302-15345 /branches/wolfgang/src/org/exist/xquery/LocationStep.java:10658-11213 /trunk/eXist/nbproject/src/org/exist/xquery/LocationStep.java:8007-14504 /trunk/eXist/src/org/exist/xquery/LocationStep.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/src/org/exist/xquery/pragmas/Optimize.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/src/org/exist/xquery/pragmas/Optimize.java:14123-14668 /branches/adam/eXist-xq3/src/org/exist/xquery/pragmas/Optimize.java:13010-13060 /branches/adam/security-locking/src/org/exist/xquery/pragmas/Optimize.java:15302-15345 /branches/wolfgang/src/org/exist/xquery/pragmas/Optimize.java:10658-11213 /stable/eXist-1.4.x/src/org/exist/xquery/pragmas/Optimize.java:13410 /trunk/eXist/nbproject/src/org/exist/xquery/pragmas/Optimize.java:8007-14504 /trunk/eXist/src/org/exist/xquery/pragmas/Optimize.java:15143-15748 + /branches/adam/eXist-acl/src/org/exist/xquery/pragmas/Optimize.java:14123-14668 /branches/adam/eXist-xq3/src/org/exist/xquery/pragmas/Optimize.java:13010-13060 /branches/adam/security-locking/src/org/exist/xquery/pragmas/Optimize.java:15302-15345 /branches/wolfgang/src/org/exist/xquery/pragmas/Optimize.java:10658-11213 /stable/eXist-1.4.x/src/org/exist/xquery/pragmas/Optimize.java:13410 /trunk/eXist/nbproject/src/org/exist/xquery/pragmas/Optimize.java:8007-14504 /trunk/eXist/src/org/exist/xquery/pragmas/Optimize.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/test/src/org/exist/dom/BasicNodeSetTest.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/test/src/org/exist/dom/BasicNodeSetTest.java:14123-14668 /branches/adam/security-locking/test/src/org/exist/dom/BasicNodeSetTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/dom/BasicNodeSetTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/dom/BasicNodeSetTest.java:8007-14504 /trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java:15143-15748 + /branches/adam/eXist-acl/test/src/org/exist/dom/BasicNodeSetTest.java:14123-14668 /branches/adam/security-locking/test/src/org/exist/dom/BasicNodeSetTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/dom/BasicNodeSetTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/dom/BasicNodeSetTest.java:8007-14504 /trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/test/src/org/exist/fulltext/FTIndexTest.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/test/src/org/exist/fulltext/FTIndexTest.java:14123-14668 /branches/adam/security-locking/test/src/org/exist/fulltext/FTIndexTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/fulltext/FTIndexTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/fulltext/FTIndexTest.java:8007-14504 /trunk/eXist/test/src/org/exist/fulltext/FTIndexTest.java:15143-15748 + /branches/adam/eXist-acl/test/src/org/exist/fulltext/FTIndexTest.java:14123-14668 /branches/adam/security-locking/test/src/org/exist/fulltext/FTIndexTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/fulltext/FTIndexTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/fulltext/FTIndexTest.java:8007-14504 /trunk/eXist/test/src/org/exist/fulltext/FTIndexTest.java:15143-15752 Modified: branches/adam/eXist-security-refinements/test/src/org/exist/http/urlrewrite/URLRewriteTest.java =================================================================== --- branches/adam/eXist-security-refinements/test/src/org/exist/http/urlrewrite/URLRewriteTest.java 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/test/src/org/exist/http/urlrewrite/URLRewriteTest.java 2012-01-29 13:49:15 UTC (rev 15753) @@ -92,7 +92,7 @@ } @Override - public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + public void doRewrite(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { throw new UnsupportedOperationException("Not supported yet."); } Property changes on: branches/adam/eXist-security-refinements/test/src/org/exist/xquery/OptimizerTest.java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/test/src/org/exist/xquery/OptimizerTest.java:14123-14668 /branches/adam/eXist-xq3/test/src/org/exist/xquery/OptimizerTest.java:13010-13037 /branches/adam/security-locking/test/src/org/exist/xquery/OptimizerTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/xquery/OptimizerTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/xquery/OptimizerTest.java:8007-14504 /trunk/eXist/test/src/org/exist/xquery/OptimizerTest.java:15143-15748 + /branches/adam/eXist-acl/test/src/org/exist/xquery/OptimizerTest.java:14123-14668 /branches/adam/eXist-xq3/test/src/org/exist/xquery/OptimizerTest.java:13010-13037 /branches/adam/security-locking/test/src/org/exist/xquery/OptimizerTest.java:15302-15345 /branches/wolfgang/test/src/org/exist/xquery/OptimizerTest.java:10658-11213 /trunk/eXist/nbproject/test/src/org/exist/xquery/OptimizerTest.java:8007-14504 /trunk/eXist/test/src/org/exist/xquery/OptimizerTest.java:15143-15752 Property changes on: branches/adam/eXist-security-refinements/tools/Solaris ___________________________________________________________________ Modified: svn:mergeinfo - /branches/adam/eXist-acl/tools/Solaris:14123-14668 /branches/adam/security-locking/tools/Solaris:15302-15345 /trunk/eXist/nbproject/tools/Solaris:8007-14504 /trunk/eXist/tools/Solaris:15143-15748 + /branches/adam/eXist-acl/tools/Solaris:14123-14668 /branches/adam/security-locking/tools/Solaris:15302-15345 /trunk/eXist/nbproject/tools/Solaris:8007-14504 /trunk/eXist/tools/Solaris:15143-15752 Property changes on: branches/adam/eXist-security-refinements/tools/jetty/etc/standalone/WEB-INF ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/eXist/tools/jetty/etc/standalone/WEB-INF:15143-15748 + /trunk/eXist/tools/jetty/etc/standalone/WEB-INF:15143-15752 Modified: branches/adam/eXist-security-refinements/webapp/WEB-INF/web.xml.tmpl =================================================================== --- branches/adam/eXist-security-refinements/webapp/WEB-INF/web.xml.tmpl 2012-01-29 12:37:46 UTC (rev 15752) +++ branches/adam/eXist-security-refinements/webapp/WEB-INF/web.xml.tmpl 2012-01-29 13:49:15 UTC (rev 15753) @@ -17,6 +17,21 @@ <description>eXist Open Source Native XML Database</description> <display-name>eXist XML Database</display-name> + <servlet> + <servlet-name>ScaleImageJAI</servlet-name> + <servlet-class>org.exist.http.servlets.ScaleImageJAI</servlet-class> + + <init-param> + <param-name>base</param-name> + <param-value>xmldb:exist:///db</param-value> + </init-param> + + <init-param> + <param-name>output-dir</param-name> + <param-value>/home/wolf/images</param-value> + </init-param> + </servlet> + <!-- Log4jInit initializes Log4j. Only needed when eXist is deployed as a .war file in e.g. Tomcat. @@ -197,9 +212,9 @@ <!-- XQueryURLRewrite, servlet filter for URL rewriting and redirection. --> - <filter> - <filter-name>XQueryURLRewrite</filter-name> - <filter-class>org.exist.http.urlrewrite.XQueryURLRewrite</filter-class> + <servlet> + <servlet-name>XQueryURLRewrite</servlet-name> + <servlet-class>org.exist.http.urlrewrite.XQueryURLRewrite</servlet-class> <!-- Defines the location of the controller-config.xml file, which defines the root mappings. --> @@ -222,7 +237,7 @@ <param-value>false</param-value> </init-param> --> - </filter> + </servlet> <!-- XSLTServlet applies an XSLT transformation to its input stream. @@ -288,10 +303,10 @@ --> <!-- XQuery URL rewriter --> - <filter-mapping> - <filter-name>XQueryURLRewrite</filter-name> + <servlet-mapping> + <servlet-name>XQueryURLRewrite</servlet-name> <url-pattern>/*</url-pattern> - </filter-mapping> + </servlet-mapping> <!-- XMLRPC --> <!-- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |