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

Method start

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

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

(PrintWriter writer, ContextName cn, StringManager smClient)

Source from the content-addressed store, hash-verified

1341 * @param smClient i18n support for current client's locale
1342 */
1343 protected void start(PrintWriter writer, ContextName cn, StringManager smClient) {
1344
1345 if (debug >= 1) {
1346 log("start: Starting web application '" + cn + "'");
1347 }
1348
1349 if (!validateContextName(cn, writer, smClient)) {
1350 return;
1351 }
1352
1353 String displayPath = cn.getDisplayName();
1354
1355 try {
1356 Context context = (Context) host.findChild(cn.getName());
1357 if (context == null) {
1358 writer.println(smClient.getString("managerServlet.noContext", Escape.htmlElementContent(displayPath)));
1359 return;
1360 }
1361 context.start();
1362 if (context.getState().isAvailable()) {
1363 writer.println(smClient.getString("managerServlet.started", displayPath));
1364 } else {
1365 writer.println(smClient.getString("managerServlet.startFailed", displayPath));
1366 }
1367 } catch (Throwable t) {
1368 ExceptionUtils.handleThrowable(t);
1369 log(sm.getString("managerServlet.error.start", displayPath), t);
1370 writer.println(smClient.getString("managerServlet.startFailed", displayPath));
1371 writer.println(smClient.getString("managerServlet.exception", t.toString()));
1372 }
1373
1374 }
1375
1376
1377 /**

Callers 1

doGetMethod · 0.95

Calls 13

validateContextNameMethod · 0.95
htmlElementContentMethod · 0.95
handleThrowableMethod · 0.95
logMethod · 0.65
getDisplayNameMethod · 0.65
findChildMethod · 0.65
getNameMethod · 0.65
getStringMethod · 0.65
startMethod · 0.65
isAvailableMethod · 0.65
getStateMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected