|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.webapp.ServletContextImpl
com.caucho.server.webapp.WebApp
public class WebApp
Resin's webApp implementation.
| Constructor Summary | |
|---|---|
WebApp(Path rootDirectory)
Creates the webApp with its environment loader. |
|
| Method Summary | |
|---|---|
void |
addCacheMapping(CacheMapping mapping)
Returns the maximum length for a cache. |
void |
addConfigFile(Path path)
Backwards compatability for config-file. |
void |
addContextParam(InitParam initParam)
Sets the context param |
void |
addErrorPage(ErrorPage errorPage)
Adds an error page |
void |
addFilter(FilterConfigImpl config)
Adds a filter configuration. |
void |
addFilterMapping(FilterMapping filterMapping)
Adds a filter-mapping configuration. |
void |
addJspConfig(JspConfig config)
jsp-config configuration |
void |
addListener(Listener listener)
|
void |
addMimeMapping(MimeMapping mimeMapping)
Adds a mime-mapping |
void |
addPathMapping(PathMapping pathMapping)
Adds a path-mapping |
void |
addPersistenceContextRef(PersistenceContextRefConfig persistenceContextRefConfig)
Adds a persistence-context-ref configuration. |
void |
addResourceRef(ResourceRef ref)
Adds a ResourceRef validator. |
void |
addSecurityConstraint(SecurityConstraint constraint)
Adds a security constraint |
void |
addSecurityRole(SecurityRole role)
Adds a security role |
void |
addServlet(ServletConfigImpl config)
Adds a servlet configuration. |
void |
addServletMapping(ServletMapping servletMapping)
Adds a servlet-mapping configuration. |
void |
addServletRegexp(ServletRegexp servletRegexp)
Adds a servlet-regexp configuration. |
void |
addSessionConfig(SessionManager manager)
Adds the session manager. |
void |
addStatus500()
|
void |
addTaglib(JspTaglib taglib)
taglib configuration |
void |
addWebApp(WebAppConfig config)
Adds a sub web-app |
void |
addWebAppDefault(WebAppConfig config)
Adds a web-app default |
void |
addWebAppDeploy(WebAppExpandDeployGenerator deploy)
Adds a war generator |
void |
addWelcomeFileList(WelcomeFileList list)
Adds a welcome file list to the webApp. |
void |
buildDispatchInvocation(Invocation invocation,
FilterMapper filterMapper)
Fills the invocation for subrequests. |
void |
buildErrorInvocation(Invocation invocation)
Fills the invocation for an error request. |
void |
buildForwardInvocation(Invocation invocation)
Fills the invocation for a forward request. |
void |
buildIncludeInvocation(Invocation invocation)
Fills the invocation for an include request. |
Invocation |
buildInvocation(Invocation invocation)
Fills the servlet instance. |
void |
buildLoginInvocation(Invocation invocation)
Fills the invocation for a login request. |
void |
clearCache()
Clears all caches, including the invocation cache, the filter cache, and the proxy cache. |
AccessLog |
createAccessLog()
Sets the access log. |
InitParam |
createContextParam()
Sets an init-param |
EjbLocalRef |
createEjbLocalRef()
ejb-local-ref configuration |
EjbRef |
createEjbRef()
ejb-ref configuration |
JspPropertyGroup |
createJsp()
jsp configuration |
JspConfig |
createJspConfig()
|
LocaleEncodingMappingList |
createLocaleEncodingMappingList()
Configures the locale encoding. |
MultipartForm |
createMultipartForm()
Multipart form config. |
RewriteDispatch |
createRewriteDispatch()
Adds rewrite-dispatch. |
RewriteRealPath |
createRewriteRealPath()
Adds rewrite-real-path. |
ServletConfigImpl |
createServlet()
Adds a servlet configuration. |
ServletMapping |
createServletMapping()
|
SessionManager |
createSessionConfig()
Configures the session manager. |
WebAppExpandDeployGenerator |
createWebAppDeploy()
Sets the war-expansion |
void |
destroy()
Closes the webApp. |
boolean |
doMultipartForm()
Returns true if multipart forms are enabled. |
AbstractAccessLog |
getAccessLog()
Returns the access log |
int |
getActiveSessionCount()
Returns the active session count. |
WebAppAdmin |
getAdmin()
|
Path |
getAppDir()
Gets the webApp directory. |
ServletAuthenticator |
getAuthenticator()
Gets the authenticator |
long |
getCacheMaxLength()
Returns the maximum length for a cache. |
java.lang.String |
getCharacterEncoding()
Returns the character encoding. |
java.lang.ClassLoader |
getClassLoader()
Gets the environment class loader. |
java.lang.String[] |
getClassLoaderHackPackages()
Returns the classloader hack packages. |
Cluster |
getCluster()
Returns the current cluster. |
java.lang.Throwable |
getConfigException()
Gets the config exception. |
ServletContext |
getContext(java.lang.String uri)
Returns the servlet context for the URI. |
java.lang.String |
getContextPath()
Gets the context path |
boolean |
getCookieHttpOnly()
Sets the cookie-http-only |
java.lang.String |
getDescription()
A user description of the web-app |
DispatchServer |
getDispatchServer()
Gets the dispatch server. |
boolean |
getDispatchWrapsFilters()
Get true if includes wrap filters. |
EnvironmentClassLoader |
getEnvironmentClassLoader()
Gets the environment class loader. |
ErrorPageManager |
getErrorPageManager()
Gets the error page manager. |
java.lang.Object |
getExtension(java.lang.String key)
Returns an extension. |
long |
getFormUploadMax()
Returns the form upload max. |
HostMXBean |
getHostAdmin()
Gets the URL |
java.lang.String |
getHostName()
Gets the URL |
DependencyContainer |
getInvocationDependency()
Gets the dependency container |
JspPropertyGroup |
getJsp()
Returns the JSP configuration. |
JspApplicationContextImpl |
getJspApplicationContext()
Returns the JspApplicationContext for EL evaluation. |
static WebApp |
getLocal()
Returns the local webApp. |
java.lang.String |
getLocaleEncoding(java.util.Locale locale)
Returns the locale encoding. |
AbstractLogin |
getLogin()
Gets the login manager. |
RequestDispatcher |
getLoginDispatcher(java.lang.String url)
Returns a dispatcher for the named servlet. |
long |
getMaxAge(java.lang.String uri)
Returns the time for a cache mapping. |
java.lang.String |
getMimeType(java.lang.String uri)
Returns the mime type for a uri |
java.lang.String |
getMimeTypeImpl(java.lang.String ext)
Maps from a URI to a real path. |
RequestDispatcher |
getNamedDispatcher(java.lang.String servletName)
Returns a dispatcher for the named servlet. |
javax.management.ObjectName |
getObjectName()
Returns the ObjectName. |
WebAppContainer |
getParent()
Gets the parent container. |
java.lang.String |
getRealPath(java.lang.String uri)
Maps from a URI to a real path. |
java.lang.String |
getRealPathImpl(java.lang.String uri)
Maps from a URI to a real path. |
java.util.ArrayList<java.lang.String> |
getRegexp()
Gets the regexp vars. |
ServletRequestAttributeListener[] |
getRequestAttributeListeners()
Returns the request attribute listeners. |
int |
getRequestCount()
Returns the request count. |
RequestDispatcher |
getRequestDispatcher(java.lang.String url)
Returns a dispatcher for the named servlet. |
ServletRequestListener[] |
getRequestListeners()
Returns the request listeners. |
java.lang.String |
getSchema()
Returns the relax schema. |
Server |
getServer()
Gets the dispatch server. |
java.util.ArrayList<java.lang.String> |
getServletIgnoreMappingPatterns()
Returns the best matching servlet pattern. |
java.util.ArrayList<java.lang.String> |
getServletMappingPatterns()
Returns the best matching servlet pattern. |
java.lang.String |
getServletPattern(java.lang.String uri)
Returns the best matching servlet pattern. |
SessionManager |
getSessionManager()
Gets the session manager. |
long |
getSMaxAge(java.lang.String uri)
Returns the time for a cache mapping. |
java.lang.String |
getState()
Returns true if the webApp is active. |
boolean |
getStrictMapping()
Get the strict mapping setting. |
java.util.ArrayList<JspTaglib> |
getTaglibList()
Returns the taglib configuration. |
static ServletRequest |
getThreadRequest()
|
java.lang.String |
getURL()
Gets the URL |
java.lang.String |
getVersion()
Returns the servlet version. |
java.util.ArrayList<WebAppConfig> |
getWebAppDefaultList()
Adds a web-app default |
boolean |
has23Config()
Returns true for JSP 1.x |
boolean |
hasListener(java.lang.Class listenerClass)
Returns true if a listener with the given type exists. |
void |
init()
Initializes. |
boolean |
isActive()
Returns true if the webApp is active. |
boolean |
isClosed()
Returns true if it's closed. |
boolean |
isDeployError()
Returns true if the webApp deployed with an error. |
boolean |
isDeployIdle()
Returns true if the deployment is idle. |
boolean |
isDynamicDeploy()
Set true for a dynamically deployed server. |
boolean |
isIgnoreClientDisconnect()
Returns true if should ignore client disconnect. |
boolean |
isInheritSession()
Gets inherit session. |
boolean |
isInit()
Returns true if it's init. |
boolean |
isInitializing()
Returns true if it's in the middle of initializing |
boolean |
isModified()
Returns true if the webApp has been modified. |
boolean |
isModifiedNow()
Returns true if the webApp has been modified. |
void |
log(java.lang.String message,
java.lang.Throwable e)
Error logging |
boolean |
logModified(java.util.logging.Logger log)
Log the reason for modification. |
void |
putLocaleEncoding(java.lang.String locale,
java.lang.String encoding)
Adds a locale-mapping |
void |
setAccessLog(AbstractAccessLog log)
Sets the access log. |
void |
setActiveWaitTime(Period wait)
Sets the delay time waiting for a restart |
void |
setAllowServletEL(boolean allow)
Sets the servlet init-param EL enabling. |
void |
setAppDir(Path appDir)
Sets the webApp directory. |
void |
setConfigException(java.lang.Throwable e)
Sets the config exception. |
void |
setConfigNode(org.w3c.dom.Node node)
Sets the node for testing Servlet/JSP versions. |
void |
setCookieHttpOnly(boolean isHttpOnly)
Sets the cookie-http-only |
void |
setDescription(java.lang.String description)
A user description of the web-app |
void |
setDirectoryServlet(java.lang.String className)
(compat) sets the directory servlet |
void |
setDisableCrossContext(boolean isDisable)
If true, disables getContext(). |
void |
setDispatchWrapsFilters(boolean wrap)
Set true if includes wrap filters. |
void |
setDocumentDirectory(Path appDir)
Sets the document directory (app-dir). |
void |
setDynamicDeploy(boolean isDynamicDeploy)
Set true for a dynamically deployed server. |
void |
setEnvironmentClassLoader(EnvironmentClassLoader loader)
Sets the environment class loader. |
void |
setIcon(Icon icon)
Sets the icon |
void |
setId(java.lang.String id)
The id is the context path. |
void |
setIdleTime(Period idle)
Sets the delay time waiting for requests to end. |
void |
setInheritSession(boolean isInheritSession)
Sets inherit session. |
void |
setLazyServletValidate(boolean isLazy)
Lazy servlet validation. |
void |
setLoginConfig(LoginConfig loginConfig)
Sets the login |
void |
setOldWebApp(WebApp oldWebApp,
long expireTime)
Sets the old version web-app. |
void |
setParent(WebAppContainer parent)
Sets the parent container. |
void |
setRegexp(java.util.ArrayList<java.lang.String> regexp)
Sets the regexp vars. |
void |
setRootDirectory(Path appDir)
Sets the root directory (app-dir). |
void |
setSchemaLocation(java.lang.String location)
Sets the schema location. |
void |
setSecure(boolean isSecure)
Sets the secure requirement. |
void |
setShutdownWaitMax(Period wait)
Sets the delay time waiting for requests to end. |
void |
setStrictMapping(boolean isStrict)
Set true if strict mapping. |
void |
setTempDir(Path path)
Sets the temporary directory |
void |
setVersion(java.lang.String version)
Sets the servlet version. |
void |
start()
Starts the deployment instance |
void |
stop()
Stops the webApp. |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.server.webapp.ServletContextImpl |
|---|
addAttributeListener, getAttribute, getAttributeNames, getInitParameter, getInitParameterNames, getMajorVersion, getMinorVersion, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServlets, log, log, removeAttribute, setAttribute, setDisplayName, setInitParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WebApp(Path rootDirectory)
| Method Detail |
|---|
public void setParent(WebAppContainer parent)
public void setDynamicDeploy(boolean isDynamicDeploy)
public boolean isDynamicDeploy()
public WebAppContainer getParent()
public static WebApp getLocal()
public DispatchServer getDispatchServer()
public Server getServer()
public void setId(java.lang.String id)
public java.lang.ClassLoader getClassLoader()
getClassLoader in interface EnvironmentBeangetClassLoader in interface DeployInstancepublic void setEnvironmentClassLoader(EnvironmentClassLoader loader)
public EnvironmentClassLoader getEnvironmentClassLoader()
public java.lang.String getSchema()
getSchema in interface SchemaBeanpublic void setConfigNode(org.w3c.dom.Node node)
public Path getAppDir()
getAppDir in class ServletContextImplpublic DependencyContainer getInvocationDependency()
public void setRegexp(java.util.ArrayList<java.lang.String> regexp)
public java.util.ArrayList<java.lang.String> getRegexp()
public void setDocumentDirectory(Path appDir)
public void setRootDirectory(Path appDir)
setRootDirectory in interface EnvironmentDeployInstancepublic void setAppDir(Path appDir)
public javax.management.ObjectName getObjectName()
public java.lang.String getContextPath()
getContextPath in interface ServletContextgetContextPath in class ServletContextImplpublic void setVersion(java.lang.String version)
public java.lang.String getVersion()
public void setSchemaLocation(java.lang.String location)
public java.lang.String getURL()
public java.lang.String getHostName()
public HostMXBean getHostAdmin()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public void setIcon(Icon icon)
public void setAllowServletEL(boolean allow)
public void setDisableCrossContext(boolean isDisable)
public void setOldWebApp(WebApp oldWebApp,
long expireTime)
public ServletConfigImpl createServlet()
throws ServletException
ServletException
public void addServlet(ServletConfigImpl config)
throws ServletException
ServletExceptionpublic java.lang.String getCharacterEncoding()
public void setStrictMapping(boolean isStrict)
throws ServletException
ServletExceptionpublic boolean getStrictMapping()
public void setLazyServletValidate(boolean isLazy)
public ServletMapping createServletMapping()
public void addServletMapping(ServletMapping servletMapping)
throws ServletException
ServletException
public void addServletRegexp(ServletRegexp servletRegexp)
throws ServletException,
java.lang.ClassNotFoundException
ServletException
java.lang.ClassNotFoundExceptionpublic void addFilter(FilterConfigImpl config)
public void addFilterMapping(FilterMapping filterMapping)
throws ServletException
ServletException
public void addPersistenceContextRef(PersistenceContextRefConfig persistenceContextRefConfig)
throws ServletException
ServletExceptionpublic void setDispatchWrapsFilters(boolean wrap)
public boolean getDispatchWrapsFilters()
public void setDirectoryServlet(java.lang.String className)
throws java.lang.Exception
java.lang.Exceptionpublic void addWelcomeFileList(WelcomeFileList list)
public LocaleEncodingMappingList createLocaleEncodingMappingList()
public void setInheritSession(boolean isInheritSession)
public boolean isInheritSession()
public SessionManager createSessionConfig()
throws java.lang.Exception
java.lang.Exception
public void addSessionConfig(SessionManager manager)
throws ConfigException
ConfigExceptionpublic void setCookieHttpOnly(boolean isHttpOnly)
public boolean getCookieHttpOnly()
public InitParam createContextParam()
public void addContextParam(InitParam initParam)
public void addErrorPage(ErrorPage errorPage)
public AccessLog createAccessLog()
public void setAccessLog(AbstractAccessLog log)
public void addMimeMapping(MimeMapping mimeMapping)
public void putLocaleEncoding(java.lang.String locale,
java.lang.String encoding)
public java.lang.String getLocaleEncoding(java.util.Locale locale)
public RewriteDispatch createRewriteDispatch()
public RewriteRealPath createRewriteRealPath()
public void addPathMapping(PathMapping pathMapping)
throws java.lang.Exception
java.lang.Exception
public void setLoginConfig(LoginConfig loginConfig)
throws java.lang.Throwable
java.lang.Throwablepublic void addSecurityConstraint(SecurityConstraint constraint)
public void addSecurityRole(SecurityRole role)
public void setSecure(boolean isSecure)
public void addListener(Listener listener)
throws java.lang.Exception
java.lang.Exceptionpublic boolean hasListener(java.lang.Class listenerClass)
public ServletRequestListener[] getRequestListeners()
public ServletRequestAttributeListener[] getRequestAttributeListeners()
public void addResourceRef(ResourceRef ref)
public MultipartForm createMultipartForm()
public boolean doMultipartForm()
public long getFormUploadMax()
public AbstractAccessLog getAccessLog()
public void setTempDir(Path path)
public JspPropertyGroup createJsp()
public JspPropertyGroup getJsp()
public JspApplicationContextImpl getJspApplicationContext()
public boolean has23Config()
public void addTaglib(JspTaglib taglib)
public java.util.ArrayList<JspTaglib> getTaglibList()
public JspConfig createJspConfig()
public void addJspConfig(JspConfig config)
public java.lang.Object getExtension(java.lang.String key)
public EjbRef createEjbRef()
public EjbLocalRef createEjbLocalRef()
public WebAppExpandDeployGenerator createWebAppDeploy()
public void addWebAppDeploy(WebAppExpandDeployGenerator deploy)
throws java.lang.Exception
java.lang.Exceptionpublic void addWebAppDefault(WebAppConfig config)
public java.util.ArrayList<WebAppConfig> getWebAppDefaultList()
public void addWebApp(WebAppConfig config)
throws java.lang.Exception
java.lang.Exceptionpublic void setConfigException(java.lang.Throwable e)
setConfigException in interface DeployInstancepublic java.lang.Throwable getConfigException()
getConfigException in interface DeployInstancepublic Cluster getCluster()
public boolean isIgnoreClientDisconnect()
public void setShutdownWaitMax(Period wait)
public void setActiveWaitTime(Period wait)
public void setIdleTime(Period idle)
public void addConfigFile(Path path)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getState()
public boolean isInit()
public boolean isInitializing()
public boolean isActive()
public boolean isClosed()
public static ServletRequest getThreadRequest()
public void init()
throws java.lang.Exception
init in interface EnvironmentDeployInstancejava.lang.Exceptionpublic WebAppAdmin getAdmin()
public void start()
DeployInstance
start in interface DeployInstancepublic boolean isModified()
isModified in interface DeployInstanceisModified in interface Dependencypublic boolean isModifiedNow()
isModifiedNow in interface DeployInstancepublic boolean logModified(java.util.logging.Logger log)
logModified in interface DeployInstancelogModified in interface Dependencypublic boolean isDeployError()
isDeployError in interface DeployInstancepublic boolean isDeployIdle()
isDeployIdle in interface DeployInstancepublic ServletContext getContext(java.lang.String uri)
getContext in interface ServletContextgetContext in class ServletContextImpluri - path relative to the root
public java.lang.String getServletPattern(java.lang.String uri)
public java.util.ArrayList<java.lang.String> getServletMappingPatterns()
public java.util.ArrayList<java.lang.String> getServletIgnoreMappingPatterns()
public Invocation buildInvocation(Invocation invocation)
buildInvocation in interface DispatchBuilderpublic void clearCache()
public void buildIncludeInvocation(Invocation invocation)