}
public Context addContext(Host host, String contextPath, String dir) {
+ return addContext(host, contextPath, contextPath, dir);
+ }
+
+ public Context addContext(Host host, String contextPath, String contextName,
+ String dir) {
silence(contextPath);
Context ctx = new StandardContext();
- ctx.setPath( contextPath );
+ ctx.setName(contextName);
+ ctx.setPath(contextPath);
ctx.setDocBase(dir);
ctx.addLifecycleListener(new FixContextListener());
}
public Context addWebapp(Host host, String url, String path) {
+ return addWebapp(host, url, url, path);
+ }
+
+ public Context addWebapp(Host host, String url, String name, String path) {
silence(url);
Context ctx = new StandardContext();
- ctx.setPath( url );
+ ctx.setName(name);
+ ctx.setPath(url);
ctx.setDocBase(path);
if (defaultRealm == null) {
initSimpleAuth();
Add a container event that is fired when a session's ID is changed,
e.g. on authentication. (markt)
</add>
+ <add>
+ <bug>51136</bug>: Provide methods that enable the name of a Context on
+ Context creation when using Tomcat in an embedded scenario. Based on a
+ patch provided by David Calavera. (markt)
+ </add>
<fix>
<bug>51137</bug>: Add additional Microsoft Office MIME type mappings.
(rjung)