Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2014-01-31 04:49:09 -0500
committerFlorian Waibel2014-01-31 04:49:09 -0500
commita70e5f1cb994b8479a6223c76242038ee83d2486 (patch)
tree76616691fd63fb39cfd26fec9d78983392b31d0e /org.eclipse.virgo.management.console
parentdc2904a19ff0e39accadd55c4b0ab9092bcc330f (diff)
downloadorg.eclipse.virgo.kernel-a70e5f1cb994b8479a6223c76242038ee83d2486.tar.gz
org.eclipse.virgo.kernel-a70e5f1cb994b8479a6223c76242038ee83d2486.tar.xz
org.eclipse.virgo.kernel-a70e5f1cb994b8479a6223c76242038ee83d2486.zip
426603 - Adds support for the admin console in the new deliverable Virgo Nano RAP (Jetty as OSGi HttpService only)
Diffstat (limited to 'org.eclipse.virgo.management.console')
-rw-r--r--org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/ContentServlet.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/ContentServlet.java b/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/ContentServlet.java
index 204ef0e0..04d45269 100644
--- a/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/ContentServlet.java
+++ b/org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/ContentServlet.java
@@ -197,8 +197,14 @@ public class ContentServlet extends HttpServlet {
ServletContext servletContext = getServletContext();
try {
- pageContext.put("contextPath", servletContext.getContextPath());
- pageContext.put("servletContextName", servletContext.getServletContextName());
+ if (servletContext.getContextPath().isEmpty()) {
+ // running with plain Jetty HttpService
+ pageContext.put("contextPath", Activator.contextPath);
+ pageContext.put("servletContextName", Activator.APPLICATION_NAME);
+ } else {
+ pageContext.put("contextPath", servletContext.getContextPath());
+ pageContext.put("servletContextName", servletContext.getServletContextName());
+ }
} catch(UnsupportedOperationException e){
pageContext.put("contextPath", Activator.contextPath);
pageContext.put("servletContextName", Activator.APPLICATION_NAME);

Back to the top