Object
Methods for registering URL rewriters, and for rewriting URLs using registered rewriters.
Object
URLRewriterService
Constructor Summary |
Method Summary |
public static |
|
public static final |
|
public static boolean |
|
public static void |
|
public static |
|
public static |
|
public static |
|
public static |
|
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLRewriterService()
Method Detail |
public staticReturn the form action converted into an action mapping path. The value of theString
getActionMappingName(String
action)
action
property is manipulated as follows in
computing the name of the requested mapping:
public static final URLRewriter
getDefaultRewriter()
Get the default URLRewriter.
DefaultURLRewriter
. public static boolean needsSecure(Tell whether a given URI should be written to be secure.ServletRequest
request,ServletContext
context,String
uri, boolean stripContextPath)
true
, strip the webapp context path from the URI before
processing it. true
when:
PageFlowUtils.isSecureResource(String, ServletContext, HttpServletRequest)
), or
HttpServletRequest.isSecure()
returns
true
).
false
when:
PageFlowUtils.isSecureResource(String, ServletContext, HttpServletRequest)
), or
HttpServletRequest.isSecure()
returns
false
).
public static void registerURLRewriter(Register a URLRewriter in the request. This rewriter will be used ifServletRequest
request,URLRewriter
rewriter)
URLRewriterService.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
is called.
public staticRewrite the given parameter name, using the registered URLRewriter.String
rewriteName(ServletContext
servletContext,ServletRequest
request,String
name)
public staticRewrite the given URL, using the registered URLRewriter.String
rewriteURL(ServletContext
servletContext,ServletRequest
request,ServletResponse
response,String
url,String
type)
action
: a standard (non-resource) URL, for which SSL is not required
secure-action
: a standard (non-resource) URL, for which SSL is required
resource
: a resource (e.g., image) URL, for which SSL is not required
secure-resource
: a resource (e.g., image) URL, for which SSL is required
Related Topics
URLRewriterService.registerURLRewriter(ServletRequest, URLRewriter)
public staticRewrite the given URL, using the registered URLRewriter.String
rewriteURL(ServletContext
servletContext,ServletRequest
request,ServletResponse
response,String
url,String
type, boolean doEncode)
action
: a standard (non-resource) URL, for which SSL is not required
secure-action
: a standard (non-resource) URL, for which SSL is required
resource
: a resource (e.g., image) URL, for which SSL is not required
secure-resource
: a resource (e.g., image) URL, for which SSL is required
true
, the rewritten URL will be encoded using
HttpServletResponse.encodeRedirectURL(String)
. Related Topics
URLRewriterService.registerURLRewriter(ServletRequest, URLRewriter)
public staticUnregister the URLRewriter from the request.URLRewriter
unregisterURLRewriter(ServletRequest
request)
null
if there was none registered. Related Topics
URLRewriterService.registerURLRewriter(ServletRequest, URLRewriter)