|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.codehaus.cargo.deployer.jetty.DeployerServlet
public class DeployerServlet
This servlet is used to control deploy, undeploy, redeploy, start, and stop a web application within the jetty server.
Constructor Summary | |
---|---|
DeployerServlet(org.mortbay.jetty.Server server)
Creates the DeployerServlet and gives the servlet reference to the server in which it is deployed.This gives the servlet access to the server internals which allows for deployment control. |
Method Summary | |
---|---|
protected void |
deleteDirectory(File webAppFile)
Recursively delete the webapp directory. |
protected void |
deploy(javax.servlet.http.HttpServletResponse response,
String contextPath,
String warURL)
Deploy the war to the given context path. |
protected void |
deployArchive(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String contextPath)
Deploys the archive to the server. |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the http GET method. |
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs the http PUT method. |
protected org.mortbay.jetty.handler.ContextHandler |
getContextHandler(String context)
Returns the context handler for the given context. |
protected File |
getFile(String contextPath)
Returns the file if it exists for the specified context path. |
protected String |
getWebAppLocation(org.mortbay.jetty.webapp.WebAppContext webapp)
Returns the file location for the specified webapp. |
protected void |
reload(javax.servlet.http.HttpServletResponse response,
String contextPath)
Reload the application specified with the given context. |
protected void |
sendError(javax.servlet.http.HttpServletResponse response,
String message)
Sends the given error message back in the http response. |
protected void |
sendMessage(javax.servlet.http.HttpServletResponse response,
String message)
Sends the given message back in the http response. |
protected void |
start(javax.servlet.http.HttpServletResponse response,
String contextPath)
Start the webapp for the given context path |
protected void |
stop(javax.servlet.http.HttpServletResponse response,
String contextPath)
Stop the webapp at the given context. |
protected void |
undeploy(javax.servlet.http.HttpServletResponse response,
String contextPath)
Undeploy the webapp with the given context path. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPost, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeployerServlet(org.mortbay.jetty.Server server)
server
- The server object for the currently running serverMethod Detail |
---|
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
request
- The http requestresponse
- The http response
javax.servlet.ServletException
- If a servlet exception occurs
IOException
- If an io exception occursprotected void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPut
in class javax.servlet.http.HttpServlet
request
- The http requestresponse
- The http response
javax.servlet.ServletException
- If a servlet exception occurs
IOException
- If an io exception occursprotected void deployArchive(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String contextPath) throws IOException
request
- The http requestresponse
- The http responsecontextPath
- The context path for the deployed archive
IOException
- If an io exception occursprotected File getFile(String contextPath)
contextPath
- The context path for the web app
protected void sendMessage(javax.servlet.http.HttpServletResponse response, String message) throws IOException
response
- The http responsemessage
- The message to be send
IOException
- If an io exception occursprotected void sendError(javax.servlet.http.HttpServletResponse response, String message) throws IOException
response
- The http responsemessage
- The error message to be send
IOException
- If an io exception occursprotected void deploy(javax.servlet.http.HttpServletResponse response, String contextPath, String warURL) throws IOException
response
- The http responsecontextPath
- The context path to usewarURL
- The location of the war
IOException
- If an io exception occursprotected void reload(javax.servlet.http.HttpServletResponse response, String contextPath) throws IOException
response
- The http responsecontextPath
- The context path
IOException
- If an IO exception occursprotected void undeploy(javax.servlet.http.HttpServletResponse response, String contextPath) throws IOException
response
- The http responsecontextPath
- The context path
IOException
- If an IO exception occursprotected void deleteDirectory(File webAppFile)
webAppFile
- The file to deleteprotected String getWebAppLocation(org.mortbay.jetty.webapp.WebAppContext webapp)
webapp
- The webapp
protected void stop(javax.servlet.http.HttpServletResponse response, String contextPath) throws IOException
response
- The http responsecontextPath
- The webapp's context
IOException
- If an IO exception occuredprotected void start(javax.servlet.http.HttpServletResponse response, String contextPath) throws IOException
response
- The http responsecontextPath
- The webapp's context
IOException
- If an IO exception occuredprotected org.mortbay.jetty.handler.ContextHandler getContextHandler(String context)
context
- The webapp context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |