| java.lang.Object org.apache.turbine.util.ServletUtils
Field Summary | |
final public static int | FTP_PORT The default FTP port number. | final public static int | HTTPS_PORT The default HTTPS port number. | final public static int | HTTP_PORT The default HTTP port number. | final public static String | URI_SCHEME_SEPARATOR The part of the URI which separates the protocol indicator (i.e. |
Method Summary | |
public static String | expandRelative(ServletConfig config, String text) Expands a string that points to a relative path or path list,
leaving it as an absolute path based on the servlet context.
It will return null if the text is empty or the config object
is null.
Parameters: config - The ServletConfig. Parameters: text - The String containing a path or path list. | public static StringBuffer | hostURL(HttpServletRequest req) Defaults to the scheme used in the supplied request. | public static StringBuffer | hostURL(HttpServletRequest req, String scheme) Returns a URL fragment derived from the provided HTTP request,
including the protocol used to address the server (if non-standard
for HTTP/HTTPS). |
FTP_PORT | final public static int FTP_PORT(Code) | | The default FTP port number.
|
HTTPS_PORT | final public static int HTTPS_PORT(Code) | | The default HTTPS port number.
|
HTTP_PORT | final public static int HTTP_PORT(Code) | | The default HTTP port number.
|
URI_SCHEME_SEPARATOR | final public static String URI_SCHEME_SEPARATOR(Code) | | The part of the URI which separates the protocol indicator (i.e. the
scheme) from the rest of the URI.
|
expandRelative | public static String expandRelative(ServletConfig config, String text)(Code) | | Expands a string that points to a relative path or path list,
leaving it as an absolute path based on the servlet context.
It will return null if the text is empty or the config object
is null.
Parameters: config - The ServletConfig. Parameters: text - The String containing a path or path list. A String with the expanded path or path list. |
hostURL | public static StringBuffer hostURL(HttpServletRequest req, String scheme)(Code) | | Returns a URL fragment derived from the provided HTTP request,
including the protocol used to address the server (if non-standard
for HTTP/HTTPS). Returns the fragment as a buffer
Parameters: req - The request to extract information from. Parameters: scheme - The protocol indicator to prefix the host name with, orthe protocol used to address the server with if null . The desired URL fragment. |
|
|