|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.struts.adapter.util.rewriter.URLRewriterService
Methods for registering URL rewriters, and for rewriting URLs using registered rewriters.
Constructor Summary | |
URLRewriterService()
|
Method Summary | |
static String |
createActionURL(PageContext pageContext,
String action,
String type)
|
static String |
getActionMappingName(String action)
Return the form action converted into an action mapping path. |
static URLRewriter |
getDefaultRewriter()
Get the default URLRewriter. |
protected static URLRewriter |
getRewriter(ServletRequest request)
|
static boolean |
isStandAloneForward(ServletRequest request)
Used to determine whether or not a tag is to be rendered within a nested environment, such as a portal. |
static void |
registerURLRewriter(ServletRequest request,
URLRewriter rewriter)
Register a URLRewriter in the request. |
static String |
rewriteName(ServletContext servletContext,
ServletRequest request,
String name)
Rewrite the given parameter name, using the registered URLRewriter. |
static String |
rewriteURL(ServletContext servletContext,
ServletRequest request,
ServletResponse response,
String url,
String type)
Rewrite the given URL, using the registered URLRewriter. |
static String |
rewriteURL(ServletContext servletContext,
ServletRequest request,
ServletResponse response,
String url,
String type,
boolean doEncode)
Rewrite the given URL, using the registered URLRewriter. |
static URLRewriter |
unregisterURLRewriter(ServletRequest request)
Unregister the URLRewriter from the request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLRewriterService()
Method Detail |
public static String createActionURL(PageContext pageContext, String action, String type)
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 final URLRewriter getDefaultRewriter()
DefaultURLRewriter
.protected static URLRewriter getRewriter(ServletRequest request)
public static boolean isStandAloneForward(ServletRequest request)
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 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, com.bea.struts.adapter.util.rewriter.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, com.bea.struts.adapter.util.rewriter.URLRewriter)
public static URLRewriter unregisterURLRewriter(ServletRequest request)
request
- the current HttpServletRequest.
null
if there was none registered.registerURLRewriter(javax.servlet.ServletRequest, com.bea.struts.adapter.util.rewriter.URLRewriter)
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |