org.barracudamvc.plankton.http
Class URLRewriter
java.lang.Object
org.barracudamvc.plankton.http.URLRewriter
- Direct Known Subclasses:
- URLRewriter
- public class URLRewriter
- extends Object
This just contains some Servlet utility routines
Field Summary |
static boolean |
REWRITE_URLS
This option is used to control whether or not URL rewriting occurs. |
Method Summary |
static String |
encodeRedirectURL(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String url)
Encode a redirect URL if the REWRITE_URLS option is set. |
static String |
encodeURL(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String url)
Encode a URL if the REWRITE_URLS option is set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REWRITE_URLS
public static boolean REWRITE_URLS
- This option is used to control whether or not URL rewriting occurs. It
exists to handle bugs in Enhydra 3.x in which invoking the URL rewriting
methods causes a bogus value to be returned. If you are using Enhydra 3.x,
you will want to set this value to false (you can do this without coding
changes via the your assembler xml file). Defaults to true. To see whether
or not your appserver correctly implements URL rewriting, look at
http://localhost/Barracuda/RedirectEx1
URLRewriter
public URLRewriter()
encodeURL
public static String encodeURL(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String url)
- Encode a URL if the REWRITE_URLS option is set. Using this option
makes it easy to reconfigure Barracuda if your server has problems
with URL rewriting (ie. Enhydra 3.x)
- Parameters:
req
- the servlet requestresp
- the servlet responseurl
- the target url
- Returns:
- an encoded url (unless REWRITE_URLS = false, in which case
it will just return the original url value)
encodeRedirectURL
public static String encodeRedirectURL(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String url)
- Encode a redirect URL if the REWRITE_URLS option is set. Using this option
makes it easy to reconfigure Barracuda if your server has problems
with URL rewriting (ie. Enhydra 3.x)
- Parameters:
req
- the servlet requestresp
- the servlet responseurl
- the target url
- Returns:
- an encoded url (unless REWRITE_URLS = false, in which case
it will just return the original url value)
Copyright © 2004 BarracudaMVC.org All Rights Reserved.