cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <>
Subject [AuthFW] authentication/ID from Java code
Date Fri, 25 Mar 2005 05:00:37 GMT
Hi all,

I found this wiki:, 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 {

componentManager = CocoonComponentManager.getSitemapComponentManager();
            SessionManager sessionManager = 
            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:
        <data><!-- i don't use it</data>



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

View raw message