public class SimpleWebAppContext extends Object implements WebAppContext
| Constructor and Description |
|---|
SimpleWebAppContext(javax.servlet.ServletContext servletContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
fireRequestDestroyed(javax.servlet.ServletRequest servletRequest) |
void |
fireRequestInitialized(javax.servlet.ServletRequest servletRequest) |
ClassLoader |
getClassLoader()
Returns the class loader of the web application.
|
String |
getContextPath()
Returns the context path of the web application.
|
javax.servlet.http.HttpSession |
getHttpSession(String sessId)
Returns Http session in case that session with sessId exists for this web application
|
javax.servlet.ServletContext |
getServletContext()
Returns the servlet context of the web application.
|
boolean |
importFile(String parentDirRelativePath,
String name,
InputStream source,
boolean overwrite)
Import a file in the war file.
|
void |
start()
Start the web application context usage from a client point of view.
|
void |
stop()
Stop the web application context usage.
|
public SimpleWebAppContext(javax.servlet.ServletContext servletContext)
public void start()
throws Exception
WebAppContextstart in interface WebAppContextException - any exception that would veto the usage of the web applicationpublic void stop()
WebAppContextstop in interface WebAppContextpublic javax.servlet.ServletContext getServletContext()
WebAppContextgetServletContext in interface WebAppContextpublic ClassLoader getClassLoader()
WebAppContextgetClassLoader in interface WebAppContextpublic String getContextPath()
WebAppContextgetContextPath in interface WebAppContextpublic boolean importFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite) throws IOException
WebAppContextInputstream to the target OutputStreamimportFile in interface WebAppContextparentDirRelativePath - the parent relative path in the web app starting from the app rootname - the name the created file should havesource - the data of the target fileoverwrite - if false and the file already exists nothing is doneIOException - if the file cannot be createdpublic javax.servlet.http.HttpSession getHttpSession(String sessId)
WebAppContextgetHttpSession in interface WebAppContextpublic void fireRequestInitialized(javax.servlet.ServletRequest servletRequest)
fireRequestInitialized in interface WebAppContextpublic void fireRequestDestroyed(javax.servlet.ServletRequest servletRequest)
fireRequestDestroyed in interface WebAppContextCopyright © 2021 JBoss by Red Hat. All Rights Reserved.