I've been experimenting with Merlin embedded in an application with great success.
Just recently I tried to utilize the org.apache.avalon.merlin.http.WebServer service
which is implemented by org.apache.avalon.merlin.http.JettyWebServer and ran into a
problem using WebServer.deployWebApplication(String context, String appPath). I was
able to fix the problem in JettyWebServer.java by modifying
loadWebApplicationContext(String contextName, String appURL) with the below patch.
BTW, keep up the great work.
Greg
Index: merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java
===================================================================
RCS file:
/home/cvspublic/avalon/merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java,v
retrieving revision 1.3
diff -u -r1.3 JettyWebServer.java
--- merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java
2 Dec 2003 00:07:56 -0000 1.3
+++ merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java
27 Dec 2003 01:02:53 -0000
@@ -638,13 +638,23 @@
}
}
wac.setContextPath("/" + contextName + "/*");
- String clazzName =
org.apache.avalon.merlin.http.SessionManager.class.getName();
+ String clazzName =
org.mortbay.jetty.servlet.SessionManager.class.getName();
wac.getServletHandler().setSessionManager((SessionManager)
m_serviceManager.lookup(clazzName));
} catch (Exception e) {
m_logger.error("Failed to load context: " + contextName);
return;
}
m_httpServer.addContext(wac);
+
+ // Start the context if the HttpServer instance has been started
+ if (m_httpServer.isStarted()) {
+
+ try {
+ wac.start();
+ } catch (Exception e) {
+ m_logger.error("Failed to start context: " + contextName);
+ }
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]