From 0dd1925b4d7af101156b5c67d7df10be2cd6aaea Mon Sep 17 00:00:00 2001 From: James Holmes Date: Mon, 17 Sep 2007 13:57:39 +0000 Subject: [PATCH] WW-2188 Incompatible API Change in Component.java git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@576442 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/struts2/components/Component.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Component.java b/core/src/main/java/org/apache/struts2/components/Component.java index 076b6c584..f7f882dbb 100644 --- a/core/src/main/java/org/apache/struts2/components/Component.java +++ b/core/src/main/java/org/apache/struts2/components/Component.java @@ -323,7 +323,7 @@ public class Component { } } - /** + /** * Renders an action URL by consulting the {@link org.apache.struts2.dispatcher.mapper.ActionMapper}. * @param action the action * @param namespace the namespace @@ -336,12 +336,33 @@ public class Component { * @param encodeResult should the url be encoded * @return the action url. */ + protected String determineActionURL(String action, String namespace, String method, + HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, + boolean includeContext, boolean encodeResult) { + return determineActionURL(action, namespace, method, req, res, parameters, scheme, includeContext, encodeResult, false, true); + } + + /** + * Renders an action URL by consulting the {@link org.apache.struts2.dispatcher.mapper.ActionMapper}. + * @param action the action + * @param namespace the namespace + * @param method the method + * @param req HTTP request + * @param res HTTP response + * @param parameters parameters + * @param scheme http or https + * @param includeContext should the context path be included or not + * @param encodeResult should the url be encoded + * @param forceAddSchemeHostAndPort should the scheme host and port be added to the url no matter what + * @param escapeAmp should the ampersands used separate parameters be escaped or not + * @return the action url. + */ protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp) { String finalAction = findString(action); - String finalMethod = method != null ? findString(method) : method; + String finalMethod = method != null ? findString(method) : method; String finalNamespace = determineNamespace(namespace, getStack(), req); ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, finalMethod, parameters); String uri = actionMapper.getUriFromActionMapping(mapping);