| java.lang.Object uk.org.ponder.servletutil.ServletUtil
ServletUtil | public class ServletUtil (Code) | | A collection of primitive utilities for working with Servlets, in particular
for inferring various parts of path components. This link is particularly
useful in sorting out the various meanings of HttpServletRequest returns:
http://javaalmanac.com/egs/javax.servlet/GetReqUrl.html?l=new
author: Antranig Basman (antranig@caret.cam.ac.uk) |
Method Summary | |
public static String | computeContextName(ServletContext context) Returns the context name of this ServletContext, using an algorithm
based on using the context's web.xml file as a "test resource". | public static String | getBaseURL2(HttpServletRequest hsr) Computes the "Base URL" of this servlet, defined as the complete request
path, with any trailing string agreeing with the "PathInfo" removed. | public static String | getContextBaseURL2(HttpServletRequest hsr) Computes the "Context Base URL" of this servlet, which will include the
extra stub of the path that refers to the mapping for the specific servlet. |
computeContextName | public static String computeContextName(ServletContext context)(Code) | | Returns the context name of this ServletContext, using an algorithm
based on using the context's web.xml file as a "test resource". This
name will include both leading and trailing slash.
|
getBaseURL2 | public static String getBaseURL2(HttpServletRequest hsr)(Code) | | Computes the "Base URL" of this servlet, defined as the complete request
path, with any trailing string agreeing with the "PathInfo" removed. With
the exception that the trailing slash IS reappended.
|
getContextBaseURL2 | public static String getContextBaseURL2(HttpServletRequest hsr)(Code) | | Computes the "Context Base URL" of this servlet, which will include the
extra stub of the path that refers to the mapping for the specific servlet.
|
|
|