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

Method reload

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

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

(PrintWriter writer, ContextName cn, StringManager smClient)

Source from the content-addressed store, hash-verified

1081 * @param smClient i18n support for current client's locale
1082 */
1083 protected void reload(PrintWriter writer, ContextName cn, StringManager smClient) {
1084
1085 if (debug >= 1) {
1086 log("restart: Reloading web application '" + cn + "'");
1087 }
1088
1089 if (!validateContextName(cn, writer, smClient)) {
1090 return;
1091 }
1092
1093 String name = cn.getName();
1094 try {
1095 if (tryAddServiced(name)) {
1096 try {
1097 // Validates the Context of the specified application
1098 Context context = getContextForName(cn, writer, smClient);
1099 if (context == null) {
1100 return;
1101 }
1102 context.reload();
1103 writer.println(smClient.getString("managerServlet.reloaded", cn.getDisplayName()));
1104 } finally {
1105 removeServiced(name);
1106 }
1107 } else {
1108 writer.println(smClient.getString("managerServlet.inService", cn.getDisplayName()));
1109 }
1110 } catch (Throwable t) {
1111 ExceptionUtils.handleThrowable(t);
1112 log(sm.getString("managerServlet.error.reload", cn.getDisplayName()), t);
1113 writer.println(smClient.getString("managerServlet.exception", t.toString()));
1114 }
1115 }
1116
1117
1118 /**

Callers 1

doGetMethod · 0.95

Calls 12

validateContextNameMethod · 0.95
tryAddServicedMethod · 0.95
getContextForNameMethod · 0.95
reloadMethod · 0.95
removeServicedMethod · 0.95
handleThrowableMethod · 0.95
logMethod · 0.65
getNameMethod · 0.65
getStringMethod · 0.65
getDisplayNameMethod · 0.65
toStringMethod · 0.65
printlnMethod · 0.45

Tested by

no test coverage detected