[Yanel-commits] rev 20833 - public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Wed Dec 13 22:56:07 CET 2006


Author: michi
Date: 2006-12-13 22:56:05 +0100 (Wed, 13 Dec 2006)
New Revision: 20833

Modified:
   public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
Log:
add servlet context as parameter

Modified: public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java	2006-12-13 21:23:12 UTC (rev 20832)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java	2006-12-13 21:56:05 UTC (rev 20833)
@@ -91,12 +91,13 @@
     public View getView(HttpServletRequest request, String viewId)
             throws Exception {
         Path path = new Path(request.getServletPath());
+        String servletContext =  request.getContextPath();
         View defaultView = new View();
-        return plainRequest(path, defaultView);
+        return plainRequest(path, defaultView, servletContext);
 
     }
 
-    private View plainRequest(Path path, View defaultView) throws Exception,
+    private View plainRequest(Path path, View defaultView, String servletContext) throws Exception,
             TransformerConfigurationException,
             TransformerFactoryConfigurationError, NoSuchNodeException,
             TransformerException {
@@ -142,6 +143,7 @@
         Transformer transformer = TransformerFactory.newInstance()
                 .newTransformer(getXSLTStreamSource(path, contentRepo));
         transformer.setParameter("yanel.path.name", path.getName());
+        transformer.setParameter("servlet.context", servletContext);
         transformer.setParameter("yanel.path", path.toString());
         transformer.setParameter("yanel.back2context", backToRoot(path, ""));
         transformer.setParameter("yarep.back2realm", backToRoot(new org.wyona.yanel.core.Path(rp.getPath().toString()), ""));




More information about the Yanel-commits mailing list