| java.lang.Object org.lateralnz.common.util.ServletUtils
ServletUtils | public class ServletUtils implements Constants(Code) | | common utility functions used by servlets
author: J R Briggs |
Method Summary | |
final public static void | forward(HttpServletRequest request, HttpServletResponse response, String forwardTag) | final public static void | forward(HttpServletRequest request, HttpServletResponse response) | final public static void | forwardError(HttpServletRequest request, HttpServletResponse response) | final public static String | getAttrOrParam(HttpServletRequest request, String name) | final public static BufferedReader | getBufferedReaderForURL(String urlstr, String encoding) | final public static BufferedReader | getBufferedReaderForURL(String urlstr, Map headers, String encoding) | final public static String | getContent(String httpmessage) | final public static String | getHeader(String httpmessage) | final public static String[] | getLanguageCountry(String acceptlang) | final public static Locale | getLocale(HttpServletRequest request) | final public static Locale | getLocale(HttpServletRequest request, String variant, boolean sessionset) | public static String | getParameterFromMap(Map parameterMap, String key, int index) | final public static String | getServerResponse(String url, Map headers, String encoding) | final public static String | getServerResponse(String host, int port, String request, String encoding, int timeout) | final public static void | main(String[] args) | final public static void | setLocale(HttpSession session, Locale locale) | final public static Properties | toProperties(ServletConfig config) | final public static String | toString(HttpServletRequest request) | final public static String | toString(HttpSession session) | final public static String | toString(Map queryMap) |
ServletUtils | protected ServletUtils()(Code) | | |
forward | final public static void forward(HttpServletRequest request, HttpServletResponse response)(Code) | | check if there is a forward parameter in the http request object, if so, forward on to it
Parameters: request - the servlet request Parameters: response - the servlet response |
forwardError | final public static void forwardError(HttpServletRequest request, HttpServletResponse response)(Code) | | check if there is an error parameter in the http request object, if so, forward on to it
Parameters: request - the servlet request Parameters: response - the servlet response |
getAttrOrParam | final public static String getAttrOrParam(HttpServletRequest request, String name)(Code) | | get a named attribute, and if it is not found, look for the parameter
instead
|
getLanguageCountry | final public static String[] getLanguageCountry(String acceptlang)(Code) | | |
getParameterFromMap | public static String getParameterFromMap(Map parameterMap, String key, int index)(Code) | | |
setLocale | final public static void setLocale(HttpSession session, Locale locale)(Code) | | set the locale for this session
|
|
|