java.lang.Objectorg.objectweb.telosys.util.web.WebUtil
Method Summary | |
static void |
error(javax.servlet.http.HttpServletResponse response,
java.lang.String sMsg)
|
static void |
error(javax.servlet.http.HttpServletResponse response,
java.lang.String sMsg,
java.util.ListIterator iter)
|
static boolean |
forward(java.lang.String sUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static java.lang.String |
getContextResourceURI(javax.servlet.http.HttpServletRequest request,
java.lang.String sResourcePath)
Returns the context URI for the given resource path |
static java.lang.String |
getContextResourceURL(javax.servlet.http.HttpServletRequest request,
java.lang.String sResourcePath)
Returns the full "client side" http URL for the given resource path |
static java.lang.String |
getContextRootURI(javax.servlet.http.HttpServletRequest request)
Returns the context root URI for the given request ( e.g. : "/WebAppContext" ) |
static java.lang.String |
getContextRootURL(javax.servlet.http.HttpServletRequest request)
Returns the full context root URL for the given request ( e.g. : "http://server:8080/WebAppContext" ) |
static java.lang.String |
getRootUrl(javax.servlet.http.HttpServletRequest request)
Deprecated. : use getContextRootURL() instead |
static void |
info(javax.servlet.http.HttpServletResponse response,
java.lang.String sMsg)
|
static void |
msgPage(javax.servlet.http.HttpServletResponse response,
java.lang.String sTitle,
java.lang.String sMsg)
|
static void |
noCache(javax.servlet.http.HttpServletResponse response)
Set the HTTP headers to avoid caching |
static boolean |
redirect(java.lang.String sUrl,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean forward(java.lang.String sUrl, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
sUrl
- :request
- :response
- :
javax.servlet.ServletException
- :
java.io.IOException
- :public static boolean redirect(java.lang.String sUrl, javax.servlet.http.HttpServletResponse response)
sUrl
- : "HTTP redirection" to an other URL ( HTTP code "302" )response
- :
public static void noCache(javax.servlet.http.HttpServletResponse response)
response
- public static void info(javax.servlet.http.HttpServletResponse response, java.lang.String sMsg) throws javax.servlet.ServletException, java.io.IOException
response
- :sMsg
- :
javax.servlet.ServletException
- :
java.io.IOException
- :public static void error(javax.servlet.http.HttpServletResponse response, java.lang.String sMsg) throws javax.servlet.ServletException, java.io.IOException
response
- :sMsg
- :
javax.servlet.ServletException
- :
java.io.IOException
- :public static void error(javax.servlet.http.HttpServletResponse response, java.lang.String sMsg, java.util.ListIterator iter) throws javax.servlet.ServletException, java.io.IOException
response
- :sMsg
- :iter
- :
javax.servlet.ServletException
- :
java.io.IOException
- :public static void msgPage(javax.servlet.http.HttpServletResponse response, java.lang.String sTitle, java.lang.String sMsg)
public static java.lang.String getRootUrl(javax.servlet.http.HttpServletRequest request)
request
-
public static java.lang.String getContextRootURL(javax.servlet.http.HttpServletRequest request)
request
-
public static java.lang.String getContextRootURI(javax.servlet.http.HttpServletRequest request)
request
-
public static java.lang.String getContextResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String sResourcePath)
request
- sResourcePath
- : the server side context resource path public static java.lang.String getContextResourceURI(javax.servlet.http.HttpServletRequest request, java.lang.String sResourcePath)
request
- sResourcePath
- : the server side context resource path