|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.http.urlrewrite.RewriteConfig
public class RewriteConfig
Handles static mapping configuration for the @link XQueryURLRewrite filter, defined in controller-config.xml. The static mapping is used to map base paths to base controllers or servlets.
Field Summary | |
---|---|
static String |
CONFIG_FILE
|
static String |
MAP_ELEMENT
|
static String |
PATTERN_ATTRIBUTE
|
static String |
SERVER_NAME_ATTRIBUTE
Adding server-name="www.example.com" to a root tag in the controller-config.xml file. i.e. <root server-name="example1.com" pattern="/*" path="xmldb:exist:///db/org/example1/"/> <root server-name="example2.com" pattern="/*" path="xmldb:exist:///db/org/example2/"/> Will redirect http://example1.com to /db/org/example1/ and http://example2.com to /db/org/example2/ If there is no server-name attribute on the root tag, then the server name is ignored while performing the URL rewriting. |
Constructor Summary | |
---|---|
RewriteConfig(XQueryURLRewrite urlRewrite)
|
Method Summary | |
---|---|
URLRewrite |
lookup(HttpServletRequest request)
Lookup the given path in the static mappings table. |
URLRewrite |
lookup(String path,
String serverName,
boolean staticMapping)
Lookup the given path in the static mappings table. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_FILE
public static final String MAP_ELEMENT
public static final String PATTERN_ATTRIBUTE
public static final String SERVER_NAME_ATTRIBUTE
Constructor Detail |
---|
public RewriteConfig(XQueryURLRewrite urlRewrite) throws ServletException
ServletException
Method Detail |
---|
public URLRewrite lookup(HttpServletRequest request) throws ServletException
request
- use the path from this request
ServletException
public URLRewrite lookup(String path, String serverName, boolean staticMapping) throws ServletException
path
- path to look upstaticMapping
- don't return redirects to other controllers, just static mappings
to servlets.
ServletException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |