public interface URLConstructor extends Initializable
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getForwardPage(javax.servlet.http.HttpServletRequest request)
Returns information which JSP page should continue handling this type of request.
|
java.lang.String |
makeURL(java.lang.String context,
java.lang.String name,
java.lang.String parameters)
Constructs the URL with a bunch of parameters.
|
java.lang.String |
parsePage(java.lang.String context,
javax.servlet.http.HttpServletRequest request,
java.nio.charset.Charset encoding)
Should parse the "page" parameter from the actual request.
|
static java.lang.String |
parsePageFromURL(javax.servlet.http.HttpServletRequest request,
java.nio.charset.Charset encoding)
Takes the name of the page from the request URI.
|
initializejava.lang.String makeURL(java.lang.String context, java.lang.String name, java.lang.String parameters)
context - The request context (@see WikiContext) that you want the URL forname - The page name (or in case of WikiContext.NONE, the auxiliary JSP page
or resource you want to point at). This must be URL encoded. Null is NOT safe.parameters - An URL parameter string (these must be URL-encoded, and separated with &)java.lang.String parsePage(java.lang.String context, javax.servlet.http.HttpServletRequest request, java.nio.charset.Charset encoding) throws java.io.IOException
context - In which request context the request was made (this should help in parsing)request - The HTTP request that was used when coming hereencoding - The encoding with which the request was made (UTF-8 or ISO-8859-1).java.io.IOException - If parsing failesjava.lang.String getForwardPage(javax.servlet.http.HttpServletRequest request)
request - The HTTP Request that was used to end up in this page.static java.lang.String parsePageFromURL(javax.servlet.http.HttpServletRequest request, java.nio.charset.Charset encoding)
request - The request to parseencoding - The encoding to useCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.