|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.web.Web
An entry point for functions of the web package.
Field Summary | |
static String |
ROOT_WEBAPP
|
static String |
versionId
|
Constructor Summary | |
Web()
|
Method Summary | |
static URL |
findResource(String resource)
Finds a concrete URL corresponding to an abstract webapp resource. |
static URL |
findResource(String[] webapps,
String path)
Finds a concrete URL corresponding to an abstract webapp resource. |
static InputStream |
findResourceAsStream(String resource)
Follows the same rules as findResource(String), but instead returns an input stream for reading the resource |
static InputStream |
findResourceAsStream(String[] webapps,
String path)
Follows the same rules as findResource(String[], String), but instead returns an input stream for reading the resource |
static javax.servlet.RequestDispatcher |
findResourceDispatcher(String resource)
Follows the same rules as findResource(String), but instead returns a request dispatcher for serving the resource |
static javax.servlet.RequestDispatcher |
findResourceDispatcher(String[] webapps,
String path)
Follows the same rules as findResource(String[], String), but instead returns a request dispatcher for serving the resource |
static WebConfig |
getConfig()
Gets the configuration record for code in the web package. |
static WebContext |
getContext()
Gets the web context object from the current thread. |
static javax.servlet.http.HttpServletRequest |
getRequest()
Gets the servlet request object of the current thread. |
static javax.servlet.ServletContext |
getServletContext()
Gets the servlet context of the current thread. |
static javax.servlet.ServletContext |
getServletContext(String uri)
Gets the servlet context matching a URI. |
static UserContext |
getUserContext()
Gets the user context object of the current thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String ROOT_WEBAPP
Constructor Detail |
public Web()
Method Detail |
public static final WebContext getContext()
WebContext
object; it cannot be nullpublic static final WebConfig getConfig()
WebConfig
configuration record; it
cannot be nullpublic static final javax.servlet.http.HttpServletRequest getRequest()
HttpServletRequest
; it can be
nullpublic static final javax.servlet.ServletContext getServletContext()
ServletContext
; it can be nullpublic static final javax.servlet.ServletContext getServletContext(String uri)
uri
- the context URI
public static final UserContext getUserContext()
UserContext
object; it can be
nullpublic static URL findResource(String resource)
/myproj,ccm-cms,ROOT/__ccm__/apps/content-section/index.slthen this method will look for resources at
/myproj/__ccm__/apps/content-section/index.sl /ccm-cms/__ccm__/apps/content-section/index.sl /ROOT/__ccm__/apps/content-section/index.sl
resource
- the resource name
public static URL findResource(String[] webapps, String path)
/myproj/__ccm__/apps/content-section/index.sl /ccm-cms/__ccm__/apps/content-section/index.sl /ROOT/__ccm__/apps/content-section/index.sl
webapps
- the list of webappspath
- the resource path
public static InputStream findResourceAsStream(String resource) throws IOException
resource
- the resource name
IOException
public static InputStream findResourceAsStream(String[] webapps, String path) throws IOException
webapps
- the list of webappspath
- the resource path
IOException
public static javax.servlet.RequestDispatcher findResourceDispatcher(String resource)
resource
- the resource name
public static javax.servlet.RequestDispatcher findResourceDispatcher(String[] webapps, String path)
webapps
- the list of webappspath
- the resource path
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |