|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tuckey.web.filters.urlrewrite.UrlRewriter
public class UrlRewriter
The main rewriter.
| Constructor Summary | |
|---|---|
UrlRewriter(Conf conf)
|
|
| Method Summary | |
|---|---|
String |
decodeRequestString(javax.servlet.http.HttpServletRequest request,
String source)
Decode the string with a URLDecoder. |
void |
destroy()
Destory the rewriter gracefully. |
Conf |
getConf()
|
String |
getContextPath(javax.servlet.http.HttpServletRequest request)
Return the context path for the given request, detecting an include request URL if called within a RequestDispatcher include. |
String |
getPathWithinApplication(javax.servlet.http.HttpServletRequest request)
Return the path within the web application for the given request. |
RewrittenUrl |
handleInvocationTargetException(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
InvocationTargetException e)
Handle an exception thrown by a Run element. |
protected RewrittenOutboundUrl |
processEncodeURL(javax.servlet.http.HttpServletResponse hsResponse,
javax.servlet.http.HttpServletRequest hsRequest,
boolean encodeUrlHasBeenRun,
String outboundUrl)
Handles rewriting urls in jsp's etc, i.e. |
RewrittenUrl |
processRequest(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
Helpful for testing but otherwise, don't use. |
boolean |
processRequest(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
javax.servlet.FilterChain parentChain)
The main method called for each request that this filter is mapped for. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UrlRewriter(Conf conf)
| Method Detail |
|---|
public RewrittenUrl processRequest(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
throws IOException,
javax.servlet.ServletException,
InvocationTargetException
IOException
javax.servlet.ServletException
InvocationTargetException
public boolean processRequest(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
javax.servlet.FilterChain parentChain)
throws IOException,
javax.servlet.ServletException
hsRequest - The request to process.
IOException
javax.servlet.ServletExceptionpublic String getPathWithinApplication(javax.servlet.http.HttpServletRequest request)
Detects include request URL if called within a RequestDispatcher include.
public String getContextPath(javax.servlet.http.HttpServletRequest request)
As the value returned by request.getContextPath() is not
decoded by the servlet container, this method will decode it.
public String decodeRequestString(javax.servlet.http.HttpServletRequest request,
String source)
public RewrittenUrl handleInvocationTargetException(javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse,
InvocationTargetException e)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOExceptionpublic Conf getConf()
protected RewrittenOutboundUrl processEncodeURL(javax.servlet.http.HttpServletResponse hsResponse,
javax.servlet.http.HttpServletRequest hsRequest,
boolean encodeUrlHasBeenRun,
String outboundUrl)
hsResponse - responsehsRequest - requestencodeUrlHasBeenRun - if encodeUrl has already been run on the originalOutboundUrl speficy this to be trueoutboundUrl - url
UrlRewriteWrappedResponsepublic void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||