org.inria.ns.reflex.modules.web
Class WebUtil

java.lang.Object
  extended by org.inria.ns.reflex.modules.web.WebUtil

public class WebUtil
extends Object

Web utilities.

Author:
Philippe Poulard

Constructor Summary
WebUtil()
           
 
Method Summary
static String getPath(ServletContext application)
          Return the path from the server root where is deployed the Web application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebUtil

public WebUtil()
Method Detail

getPath

public static String getPath(ServletContext application)
Return the path from the server root where is deployed the Web application.

This is an heuristic that might fail.

It is better to get the context path from a request.

Parameters:
application - The application.
Returns:
"/myApp" or "".
See Also:
HttpRequest#getContextPath()