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

Method process

java/org/apache/catalina/ssi/SSIConfig.java:38–60  ·  view source on GitHub ↗

Processes the config directive to set errmsg, sizefmt, and timefmt options.

(SSIMediator ssiMediator, String commandName, String[] paramNames, String[] paramValues,
            PrintWriter writer)

Source from the content-addressed store, hash-verified

36 * Processes the config directive to set errmsg, sizefmt, and timefmt options.
37 */
38 @Override
39 public long process(SSIMediator ssiMediator, String commandName, String[] paramNames, String[] paramValues,
40 PrintWriter writer) {
41 for (int i = 0; i < paramNames.length; i++) {
42 String paramName = paramNames[i];
43 String paramValue = paramValues[i];
44 String substitutedValue = ssiMediator.substituteVariables(paramValue);
45 if (paramName.equalsIgnoreCase("errmsg")) {
46 ssiMediator.setConfigErrMsg(substitutedValue);
47 } else if (paramName.equalsIgnoreCase("sizefmt")) {
48 ssiMediator.setConfigSizeFmt(substitutedValue);
49 } else if (paramName.equalsIgnoreCase("timefmt")) {
50 ssiMediator.setConfigTimeFmt(substitutedValue);
51 } else {
52 ssiMediator.log(sm.getString("ssiCommand.invalidAttribute", paramName));
53 // We need to fetch this value each time, since it may change during the loop
54 String configErrMsg = ssiMediator.getConfigErrMsg();
55 writer.write(configErrMsg);
56 }
57 }
58 // Setting config options doesn't really change the page
59 return 0;
60 }
61}

Callers

nothing calls this directly

Calls 9

substituteVariablesMethod · 0.80
setConfigErrMsgMethod · 0.80
setConfigSizeFmtMethod · 0.80
setConfigTimeFmtMethod · 0.80
getConfigErrMsgMethod · 0.80
logMethod · 0.65
getStringMethod · 0.65
writeMethod · 0.65
equalsIgnoreCaseMethod · 0.45

Tested by

no test coverage detected