MCPcopy Create free account
hub / github.com/apache/tomcat / stop

Method stop

java/org/apache/catalina/manager/ManagerServlet.java:1384–1410  ·  view source on GitHub ↗

Stop the web application at the specified context path. @param writer Writer to render to @param cn Name of the application to be stopped @param smClient i18n support for current client's locale

(PrintWriter writer, ContextName cn, StringManager smClient)

Source from the content-addressed store, hash-verified

1382 * @param smClient i18n support for current client's locale
1383 */
1384 protected void stop(PrintWriter writer, ContextName cn, StringManager smClient) {
1385
1386 if (debug >= 1) {
1387 log("stop: Stopping web application '" + cn + "'");
1388 }
1389
1390 if (!validateContextName(cn, writer, smClient)) {
1391 return;
1392 }
1393
1394 String displayPath = cn.getDisplayName();
1395
1396 try {
1397 // Validates the Context of the specified application
1398 Context context = getContextForName(cn, writer, smClient);
1399 if (context == null) {
1400 return;
1401 }
1402 context.stop();
1403 writer.println(smClient.getString("managerServlet.stopped", displayPath));
1404 } catch (Throwable t) {
1405 ExceptionUtils.handleThrowable(t);
1406 log(sm.getString("managerServlet.error.stop", displayPath), t);
1407 writer.println(smClient.getString("managerServlet.exception", t.toString()));
1408 }
1409
1410 }
1411
1412
1413 /**

Callers 1

doGetMethod · 0.95

Calls 9

validateContextNameMethod · 0.95
getContextForNameMethod · 0.95
handleThrowableMethod · 0.95
logMethod · 0.65
getDisplayNameMethod · 0.65
stopMethod · 0.65
getStringMethod · 0.65
toStringMethod · 0.65
printlnMethod · 0.45

Tested by

no test coverage detected