|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectURLRewriterService
URLRewriterService
instead.
public class URLRewriterService
Methods for registering URL rewriters, and for rewriting URLs using registered rewriters.
Constructor Summary | |
---|---|
URLRewriterService()
Deprecated. |
Method Summary | |
---|---|
static boolean |
allowParamsOnFormAction(ServletContext servletContext,
ServletRequest request)
Deprecated. Tell whether rewritten form actions should be allowed to have query parameters. |
static String |
getActionMappingName(String action)
Deprecated. Return the form action converted into an action mapping path. |
static URLRewriter |
getDefaultRewriter()
Deprecated. Get the default URLRewriter. |
static boolean |
needsSecure(ServletRequest request,
ServletContext context,
String uri,
boolean stripContextPath)
Deprecated. Tell whether a given URI should be written to be secure. |
static void |
registerURLRewriter(ServletRequest request,
URLRewriter rewriter)
Deprecated. Register a URLRewriter in the request. |
static String |
rewriteName(ServletContext servletContext,
ServletRequest request,
String name)
Deprecated. Rewrite the given parameter name, using the registered URLRewriter. |
static String |
rewriteURL(ServletContext servletContext,
ServletRequest request,
ServletResponse response,
String url,
String type)
Deprecated. Rewrite the given URL, using the registered URLRewriter. |
static String |
rewriteURL(ServletContext servletContext,
ServletRequest request,
ServletResponse response,
String url,
String type,
boolean doEncode)
Deprecated. Rewrite the given URL, using the registered URLRewriter. |
static URLRewriter |
unregisterURLRewriter(ServletRequest request)
Deprecated. Unregister the URLRewriter from the request. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLRewriterService()
Method Detail |
---|
public static final URLRewriter getDefaultRewriter()
DefaultURLRewriter
.public static String rewriteName(ServletContext servletContext, ServletRequest request, String name)
servletContext
- the current ServletContext.request
- the current HttpServletRequest.name
- the parameter name to rewrite.
public static String rewriteURL(ServletContext servletContext, ServletRequest request, ServletResponse response, String url, String type)
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
registerURLRewriter(javax.servlet.ServletRequest, org.apache.beehive.netui.pageflow.util.URLRewriter)
public static String rewriteURL(ServletContext servletContext, ServletRequest request, ServletResponse response, String url, String type, boolean doEncode)
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
doEncode
- if true
, the rewritten URL will be encoded using
HttpServletResponse.encodeRedirectURL(java.lang.String)
.
registerURLRewriter(javax.servlet.ServletRequest, org.apache.beehive.netui.pageflow.util.URLRewriter)
public static void registerURLRewriter(ServletRequest request, URLRewriter rewriter)
rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)
is called.
request
- the current HttpServletRequest.rewriter
- the URLRewriter to register.public static URLRewriter unregisterURLRewriter(ServletRequest request)
request
- the current HttpServletRequest.
null
if there was none registered.registerURLRewriter(javax.servlet.ServletRequest, org.apache.beehive.netui.pageflow.util.URLRewriter)
public static String getActionMappingName(String action)
action
property is manipulated as follows in
computing the name of the requested mapping:
action
- the action name to be converted.
public static boolean needsSecure(ServletRequest request, ServletContext context, String uri, boolean stripContextPath)
request
- the current HttpServletRequest.context
- the current ServletContext.uri
- the URI to check.stripContextPath
- if true
, strip the webapp context path from the URI before
processing it.
true
when:
PageFlowUtils.isSecureResource(java.lang.String, javax.servlet.ServletContext)
), or
ServletRequest.isSecure()
returns
true
).
false
when:
PageFlowUtils.isSecureResource(java.lang.String, javax.servlet.ServletContext)
), or
ServletRequest.isSecure()
returns
false
).
public static boolean allowParamsOnFormAction(ServletContext servletContext, ServletRequest request)
false
, then a form-tag implementation should render query parameters into hidden
fields on the form instead of allowing them to remain in the URL.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |