Hello Phil,

pherhaps I don't understand the second question right, but you can add any
element under the data element. For example <data><foo>bar</foo></data>...
If you use an action you can give the content 'foo' to your action with the
parameter element:

        <map:act type="youraction">
                <map:parameter name="foosomething" value="{foo}/>
        </map:act>  

I hope that'll help. Best regards - Claus 

__________________________________________

Claus Straube
Franc�strasse 31
80997 M�nchen
+49 (089) 14 16 682
=> -----Urspr�ngliche Nachricht-----
=> Von: Philippe Guillard [mailto:[EMAIL PROTECTED]
=> Gesendet: Freitag, 25. M�rz 2005 06:01
=> An: [email protected]
=> Betreff: [AuthFW] authentication/ID from Java code
=> 
=> Hi all,
=> 
=> I found this wiki:  http://wiki.apache.org/cocoon/AuthFWWithFlow, tried
=> this in an action to get thie ID of the user in the Portal, added the
=> import statements that seem to be needed :
=> 
=> ......
=> import org.apache.cocoon.webapps.session.SessionManager;
=> import org.apache.cocoon.components.*;
=> 
=> public class auth extends ServiceableAction implements ThreadSafe {
=> 
=>     public Map act(Redirector redirector, SourceResolver resolver,
=>             Map objectModel, String src, Parameters par) throws Exception
=> {
=> 
=>             org.apache.avalon.framework.component.ComponentManager
=> componentManager = CocoonComponentManager.getSitemapComponentManager();
=>             SessionManager sessionManager =
=> (SessionManager)componentManager.lookup(org.apache.cocoon.webapps.session
=> .SessionManager.ROLE);
=>             String user = sessionManager.getContextFragment(
=> "authentication", "/authentication/ID").getFirstChild().getNodeValue();
=> 
=> Eclipse says : "CocoonComponentManager cannot be resolved".  I can't
=> find why. My knowledge in Java is still poor...(cocoon 2.1.6rls)
=> 
=> Somebody can help ?
=> 
=> Another related question : I use Portal so it uses Authentication
=> Framwork anyway, but until now i was adding some attributes with Java
=> Session object, just because it is easier for mee to get that parameters
=> in java actions. Is there something wrong with this practice ?
=> It looks like this in authentication part:
=>         <ID>userName</ID>
=>             <role>guest</role>
=>         <data><!-- i don't use it</data>
=>         <xsp-session:set-attribute
=> name="foo"><xsp:expr>foo</xsp:expr></xsp-session:set-attribute>
=> 
=> 
=> Regards,
=> 
=> Phil
=> 
=> ---------------------------------------------------------------------
=> To unsubscribe, e-mail: [EMAIL PROTECTED]
=> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to