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)
| 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 | /** |
no test coverage detected