cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: AuthFWWithFlow
Date Sat, 18 Sep 2004 11:48:35 GMT
   Date: 2004-09-18T04:48:34
   Editor: JorgHeymans <jh@domek.be>
   Wiki: Cocoon Wiki
   Page: AuthFWWithFlow
   URL: http://wiki.apache.org/cocoon/AuthFWWithFlow

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -10,3 +10,10 @@
 var userFrag = authContext.getXML("/authentication/ID");
 var username = Packages.org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(userFrag);
 }}}
+
+The java equivalent code :
+{{{
+org.apache.avalon.framework.component.ComponentManager componentManager = CocoonComponentManager.getSitemapComponentManager();
+SessionManager sessionManager = (SessionManager)componentManager.lookup(org.apache.cocoon.webapps.session.SessionManager.ROLE);
+String username = sessionManager.getContextFragment( "authentication", "/authentication/ID").getFirstChild().getNodeValue();
+}}}

Mime
View raw message