cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <>
Subject <xsp-session:getxml>
Date Thu, 26 Sep 2002 09:50:30 GMT
I will try to explain how far I am now in the building of the 
<xsp-session:getxml> for XSP.

As I said I was researching about that, now I can get the values of the 
"authentication" context.

In XSP we can use:
Namespace: xmlns:xsp-session=""

2-Add imports:

3- Logic inside the xsp:page:

SimpleSessionContext a = 
DocumentFragment b = a.getXML("/");
String d = DOMUtil.createText(b);

Only for test I used, and it gets the values I need.


After it returns I saw in the generated HTML that there is only one context.

	<username>My name</username>

I am also researching about how to get the authentication context because 
there are two attributes and the name of the handler can be diferent as long 
as I know. Then:

A) adding imports

B) <xsp:logic>

ArrayList al = 

String al0 = ((String)al.get(0));
String al1 = ((String)al.get(1));oot node, does anyone know how
HashMap hs = ((HashMap)<xsp:expr><xsp-session:get-attribute 

With al. I can make use of the attributesnames of the session, after that I 
can get the names using the variables al0 and al1.

al0 is org.apache.cocoon.webapps.authentication.Handlers
al1 is org.apache.cocoon.webapps.authentication.SessionContext

About al1 is above a litlle explain that can helps to get directly the 
authentication ID using the Strings:

SimpleSessionContext a = 
DocumentFragment b = a.getXML("/myhandler/authentication/ID");

After this, the variable b has the value of "/authentication/ID".

About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a 
ArrayList that contains the names of the attributes.

Some examples using

<p>Key: <xsp:expr>hs.keySet()</xsp:expr></p>
<p>Value: <xsp:expr>hs.values()</xsp:expr></p>
<p>Attribute: <xsp:expr>hs.values()</xsp:expr></p>

But I cannot take the Session Context. I was thinking in a get how to get away 
the context and just write a tag like:

<xsp-session:getxml path="/myhandler/authentication"/>

Another question: Can we add this new function to the already xsp-session 

Comments are welcome :)

Antonio Gallardo

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message