standardContext.notWrapper=Child of a Context must be a Wrapper
standardContext.parameter.duplicate=Duplicate context initialization parameter {0}
standardContext.parameter.required=Both parameter name and parameter value are required
+standardContext.pathInvalid=A context path must either be an empty string or start with a ''/''. The path [{0}] does not meet these criteria and has been changed to [{1}]
standardContext.reloadingCompleted=Reloading Context with name [{0}] is completed
standardContext.reloadingFailed=Reloading this Context failed due to previous errors
standardContext.reloadingStarted=Reloading Context with name [{0}] has started
*/
@Override
public void setPath(String path) {
- this.path = path;
- encodedPath = urlEncoder.encode(path);
+ if (path == null || (!path.equals("") && !path.startsWith("/"))) {
+ this.path = "/" + path;
+ log.warn(sm.getString(
+ "standardContext.pathInvalid", path, this.path));
+ } else {
+ this.path = path;
+ }
+ encodedPath = urlEncoder.encode(this.path);
if (getName() == null) {
- setName(path);
+ setName(this.path);
}
}
Other
-->
<section name="Tomcat 7.0.12 (markt)">
+ <subsection name="Catalina">
+ <changelog>
+ <add>
+ Automatically correct invalid paths when specified for Context elements
+ inside server.xml and log a warning that the configuration has been
+ corrected. (markt)
+ </add>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<update>