remove default servlet if application base is stopped.
This commit is contained in:
parent
43cba33077
commit
f1a304f122
1 changed files with 13 additions and 1 deletions
|
@ -30,6 +30,7 @@ public class ApplicationManager {
|
|||
private SystemProperties props;
|
||||
private Server server;
|
||||
private long lastModified;
|
||||
// EmbeddedTomcat tomcat;
|
||||
|
||||
public ApplicationManager (int port, File hopHome, SystemProperties props, Server server) {
|
||||
this.port = port;
|
||||
|
@ -38,6 +39,13 @@ public class ApplicationManager {
|
|||
this.server = server;
|
||||
applications = new Hashtable ();
|
||||
lastModified = 0;
|
||||
/* tomcat = new EmbeddedTomcat();
|
||||
tomcat.setPath("/Users/hannes/Desktop/jakarta-tomcat-4.0.3/test");
|
||||
try {
|
||||
tomcat.startTomcat();
|
||||
} catch (Exception x) {
|
||||
System.err.println ("Error starting Tomcat: "+x);
|
||||
} */
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +99,9 @@ public class ApplicationManager {
|
|||
Naming.unbind ("//:"+port+"/"+appName);
|
||||
} else {
|
||||
// server.websrv.removeServlet ("/"+appName+"/");
|
||||
if ("base".equalsIgnoreCase (appName))
|
||||
server.websrv.removeDefaultServlet ();
|
||||
else
|
||||
server.websrv.removeServlet ("/"+appName+"/*");
|
||||
}
|
||||
app.stop ();
|
||||
|
@ -115,6 +126,7 @@ public class ApplicationManager {
|
|||
else {
|
||||
server.websrv.addServlet ("/"+appName+"/*", servlet);
|
||||
}
|
||||
// tomcat.addApplication (appName);
|
||||
}
|
||||
app.start ();
|
||||
} catch (Exception x) {
|
||||
|
|
Loading…
Add table
Reference in a new issue