URLRewriter Class
- public abstract class URLRewriter
extends Object
URL rewriter interface. Offers methods for rewriting URLs/query parameters, and adding URL rewriters
to the chain.
-
Hierarchy
-
Object
URLRewriter
-
Direct Known Subclasses
-
DefaultURLRewriter
public static String |
-
ACTION_SECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String) for normal (non-resource) secure URLs.
|
public static String |
-
ACTION_UNSECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String) for normal (non-resource) non-secure URLs.
|
public static String |
-
RESOURCE_SECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String) for resource (e.g., image) secure URLs.
|
public static String |
-
RESOURCE_UNSECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String) for resource (e.g., image) non-secure URLs.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACTION_SECURE
public static String
ACTION_SECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
for normal (non-resource) secure URLs.
ACTION_UNSECURE
public static String
ACTION_UNSECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
for normal (non-resource) non-secure URLs.
RESOURCE_SECURE
public static String
RESOURCE_SECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
for resource (e.g., image) secure URLs.
RESOURCE_UNSECURE
public static String
RESOURCE_UNSECURE
- Passed to
URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
for resource (e.g., image) non-secure URLs.
URLRewriter
public URLRewriter()
getNextRewriter() Method
public URLRewriter
getNextRewriter()
Get the next URLRewriter in the chain.
Related Topics
URLRewriter.setNextRewriter(URLRewriter)
rewriteName(ServletContext, ServletRequest, String) Method
public abstract String
rewriteName(ServletContext
servletContext,
ServletRequest
request,
String
name)
Rewrite the given query parameter name.
Parameters
-
servletContext
- the current ServletContext.
-
request
- the current HttpServletRequest.
-
name
- the query parameter name to rewrite.
Returns
- the rewritten query parameter name.
rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String) Method
public abstract String
rewriteURL(ServletContext
servletContext,
ServletRequest
request,
ServletResponse
response,
String
url,
String
type)
Rewrite the given URL.
Parameters
-
servletContext
- the current ServletContext.
-
request
- the current HttpServletRequest.
-
response
- the current HttpServletResponse.
-
url
- the URL to rewrite.
-
type
- the type of URL to be rewritten. This is one of the following values:
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
Returns
- the rewritten URL.
setNextRewriter(URLRewriter) Method
public void setNextRewriter(URLRewriter
nextRewriter)
Set the next URLRewriter in the chain. When URLRewriterService.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
is called, it will
start with the URLRewriter registered in the request (URLRewriterService.registerURLRewriter(ServletRequest, URLRewriter)
),
and call URLRewriter.rewriteURL(ServletContext, ServletRequest, ServletResponse, String, String)
on each URLRewriter in the chain.