Java Doc for HostManagerServlet.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » manager » host » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.manager.host 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServlet
   org.apache.catalina.manager.host.HostManagerServlet

All known Subclasses:   org.apache.catalina.manager.host.HTMLHostManagerServlet,
HostManagerServlet
public class HostManagerServlet extends HttpServlet implements ContainerServlet(Code)
Servlet that enables remote management of the virtual hosts installed on the server. Normally, this functionality will be protected by a security constraint in the web application deployment descriptor. However, this requirement can be relaxed during testing.

This servlet examines the value returned by getPathInfo() and related query parameters to determine what action is being requested. The following actions and parameters (starting after the servlet path) are supported:

  • /add?name={host-name}&aliases={host-aliases}&manager={manager} - Create and add a new virtual host. The host-name attribute indicates the name of the new host. The host-aliases attribute is a comma separated list of the host alias names. The manager attribute is a boolean value indicating if the webapp manager will be installed in the newly created host (optional, false by default).
  • /remove?name={host-name} - Remove a virtual host. The host-name attribute indicates the name of the host.
  • /list - List the virtual hosts installed on the server. Each host will be listed with the following format host-name#host-aliases.
  • /start?name={host-name} - Start the virtual host.
  • /stop?name={host-name} - Stop the virtual host.

NOTE - Attempting to stop or remove the host containing this servlet itself will not succeed. Therefore, this servlet should generally be deployed in a separate virtual host.

NOTE - For security reasons, this application will not operate when accessed via the invoker servlet. You must explicitly map this servlet with a servlet mapping, and you will always want to protect it with appropriate security constraints as well.

The following servlet initialization parameters are recognized:

  • debug - The debugging detail level that controls the amount of information that is logged by this servlet. Default is zero.

author:
   Craig R. McClanahan
author:
   Remy Maucherat
version:
   $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $


Field Summary
protected  FileconfigBase
     Path where context descriptors should be deployed.
protected  Contextcontext
     The Context container associated with our web application.
protected  intdebug
     The debugging detail level for this servlet.
protected  Engineengine
     The associated engine.
protected  Hosthost
     The associated host.
protected  MBeanServermBeanServer
     MBean server.
protected static  StringManagersm
     The string manager for this package.
protected  Wrapperwrapper
     The Wrapper container associated with this servlet.


Method Summary
protected  voidadd(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode)
     Add host with the given parameters.
protected synchronized  voidadd(PrintWriter writer, String name, String aliases, String appBase, boolean manager, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs, boolean xmlNamespaceAware, boolean xmlValidation)
     Add a host using the specified parameters.
protected  booleanbooleanParameter(HttpServletRequest request, String parameter, boolean theDefault, boolean htmlMode)
    
public  voiddestroy()
     Finalize this servlet.
public  voiddoGet(HttpServletRequest request, HttpServletResponse response)
     Process a GET request for the specified resource.
protected  FilegetConfigBase(String hostName)
     Get config base.
public  WrappergetWrapper()
     Return the Wrapper with which we are associated.
public  voidinit()
     Initialize this servlet.
protected  voidlist(PrintWriter writer)
     Render a list of the currently active Contexts in our virtual host.
protected synchronized  voidremove(PrintWriter writer, String name)
     Remove the specified host.
public  voidsetWrapper(Wrapper wrapper)
     Set the Wrapper with which we are associated.
protected  voidstart(PrintWriter writer, String name)
     Start the host with the specified name.
protected  voidstop(PrintWriter writer, String name)
     Start the host with the specified name.

Field Detail
configBase
protected File configBase(Code)
Path where context descriptors should be deployed.



context
protected Context context(Code)
The Context container associated with our web application.



debug
protected int debug(Code)
The debugging detail level for this servlet.



engine
protected Engine engine(Code)
The associated engine.



host
protected Host host(Code)
The associated host.



mBeanServer
protected MBeanServer mBeanServer(Code)
MBean server.



sm
protected static StringManager sm(Code)
The string manager for this package.



wrapper
protected Wrapper wrapper(Code)
The Wrapper container associated with this servlet.





Method Detail
add
protected void add(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode)(Code)
Add host with the given parameters.
Parameters:
  request - The request
Parameters:
  writer - The output writer
Parameters:
  name - The host name
Parameters:
  htmlMode - Flag value



add
protected synchronized void add(PrintWriter writer, String name, String aliases, String appBase, boolean manager, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs, boolean xmlNamespaceAware, boolean xmlValidation)(Code)
Add a host using the specified parameters.
Parameters:
  writer - Writer to render results to
Parameters:
  name - host name
Parameters:
  aliases - comma separated alias list
Parameters:
  appBase - application base for the host
Parameters:
  manager - should the manager webapp be deployed to the new host ?



booleanParameter
protected boolean booleanParameter(HttpServletRequest request, String parameter, boolean theDefault, boolean htmlMode)(Code)
extract boolean value from checkbox with default
Parameters:
  request -
Parameters:
  parameter -
Parameters:
  theDefault -
Parameters:
  htmlMode -



destroy
public void destroy()(Code)
Finalize this servlet.



doGet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)
Process a GET request for the specified resource.
Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are creating
exception:
  IOException - if an input/output error occurs
exception:
  ServletException - if a servlet-specified error occurs



getConfigBase
protected File getConfigBase(String hostName)(Code)
Get config base.



getWrapper
public Wrapper getWrapper()(Code)
Return the Wrapper with which we are associated.



init
public void init() throws ServletException(Code)
Initialize this servlet.



list
protected void list(PrintWriter writer)(Code)
Render a list of the currently active Contexts in our virtual host.
Parameters:
  writer - Writer to render to



remove
protected synchronized void remove(PrintWriter writer, String name)(Code)
Remove the specified host.
Parameters:
  writer - Writer to render results to
Parameters:
  name - host name



setWrapper
public void setWrapper(Wrapper wrapper)(Code)
Set the Wrapper with which we are associated.
Parameters:
  wrapper - The new wrapper



start
protected void start(PrintWriter writer, String name)(Code)
Start the host with the specified name.
Parameters:
  writer - Writer to render to
Parameters:
  name - Host name



stop
protected void stop(PrintWriter writer, String name)(Code)
Start the host with the specified name.
Parameters:
  writer - Writer to render to
Parameters:
  name - Host name



Methods inherited from javax.servlet.http.HttpServlet
protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected long getLastModified(HttpServletRequest req)(Code)(Java Doc)
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.