public class TomcatDeployer extends TomcatWarDeployer {
private String serverInfo;
private Service service;
+ private String contextPath = "/org.argeo.rap.webapp";
@Override
public void setService(Object service) {
// TODO: listen to OSGi service so that we get notified in the
// (unlikely) case the underlying service is updated
serverInfo = ((Service) service).getInfo();
- if (log.isDebugEnabled())
- log.debug("Argeo modified Tomcat deployer used");
+ if (log.isTraceEnabled())
+ log.trace("Argeo modified Tomcat deployer used");
}
@Override
// Required for multiple RAP sessions to work with Tomcat
// see
// http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application_in_multiple_browser_tabs.2Fwindows.3F
- // TODO make it configurable in order to cover other web apps
- Context context = getContext("/org.argeo.rap.webapp");
+ Context context = getContext(contextPath);
if (context != null)
context.setCookies(false);
}
/** @return null if not found */
private Context getContext(String path) {
for (Container container : getHost().findChildren()) {
- log.debug(container.getClass() + ": " + container.getName());
+ if (log.isTraceEnabled())
+ log.trace(container.getClass() + ": " + container.getName());
if (container instanceof Context) {
Context context = (Context) container;
if (path.equals(context.getPath()))
return children[0];
}
+ public void setContextPath(String contextPath) {
+ this.contextPath = contextPath;
+ }
+
}