|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.boylesoftware.cb2.admin.servlet.AdminServlet
Servlet, which displays the CB2 Application Status/Administration page and processes adminitstrative actions submitted from it.
In order to access the servlet you must define it in the
web.xml
file of your web-application and map it to a
URL ending with /cb2-admin
. Below is an example:
... <web-app> ... <servlet> <servlet-name>admin</servlet-name> <display-name>The CB2 Application Status/Admin Page</display-name> <servlet-class>com.boylesoftware.cb2.admin.servlet.AdminServlet</servlet-class> <!-- load it AFTER the main controller servlet --> <load-on-startup>15</load-on-startup> </servlet> ... <servlet-mapping> <servlet-name>admin</servlet-name> <url-pattern>/cb2-admin</url-pattern> </servlet-mapping> ... </web-app>
Note that it is very important that this servlet is loaded AFTER the main action servlet, because in its initialization it counts on the fact that the application context and all subsystems are already initialized.
Note also, that it is usually a good idea to restrict access to this servlet, especially in production environments.
Constructor Summary | |
AdminServlet()
|
Method Summary | |
void |
destroy()
Called when the servlet goes out of service. |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles a GET request. |
void |
init()
Initializes the servlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AdminServlet()
Method Detail |
public void init() throws javax.servlet.UnavailableException
javax.servlet.UnavailableException
public void destroy()
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
GET
request.
request
- the HTTP request.response
- the HTTP response.
javax.servlet.ServletException
- if an error happened during the
request processing.
java.io.IOException
- if an input/output error has happened
during the request processing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |