Performs the action associated with this particular query string
handler.
// Obtain objects relevant to the task at hand from the provided
// MessageContext's bag.
boolean enableList = ((Boolean) msgContext.getProperty
(HTTPConstants.PLUGIN_ENABLE_LIST)).booleanValue();
AxisServer engine = (AxisServer) msgContext.getProperty
(HTTPConstants.PLUGIN_ENGINE);
PrintWriter writer = (PrintWriter) msgContext.getProperty
(HTTPConstants.PLUGIN_WRITER);
HttpServletResponse response = (HttpServletResponse)
msgContext.getProperty (HTTPConstants.MC_HTTP_SERVLETRESPONSE);
if (enableList) {
Document doc = Admin.listConfig (engine);
if (doc != null) {
response.setContentType ("text/xml");
XMLUtils.DocumentToWriter (doc, writer);
}
else {
//error code is 404
response.setStatus (HttpURLConnection.HTTP_NOT_FOUND);
response.setContentType ("text/html");
writer.println ("<h2>" + Messages.getMessage ("error00") +
"</h2>");
writer.println ("<p>" + Messages.getMessage ("noDeploy00") +
"</p>");
}
}
else {
// list not enable, return error
//error code is, what, 401
response.setStatus (HttpURLConnection.HTTP_FORBIDDEN);
response.setContentType ("text/html");
writer.println ("<h2>" + Messages.getMessage ("error00") +
"</h2>");
writer.println ("<p><i>?list</i> " +
Messages.getMessage ("disabled00") + "</p>");
}