You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/09/24 01:53:54 UTC

[Auth-Framework] Diference between xsp-session and session

Can someone explain what is the diference between xsp-session and session?

I am trying to do this. But does not work:

<xsp:page xmlns:xsp-session="http://apache.org/xsp/session/2.0"
          xmlns:xsp="http://apache.org/xsp">
<document>
<xsp-session:getxml
	context="authentication"
	path="/authentication/data/full_name"/>
</document>
</xsp:page>

My main development is using XSP and I cannot get the authentication data in 
anyway.

I need to use then:

<xsp:page xmlns:session="http://cocoon.apache.org/session/1.0" 
          xmlns:xsp="http://apache.org/xsp">

Then after generate a servepage, I need to do a transformation to make work 
the session name space.

All this works fine. But when I need to use esql. This all the stuf is broken. 
The serverpages is generated first and then he cannot use 

<session:getxml
	context="authentication"
	path="/authentication/data/full_name"/>

to filter the result of a query. What can I do?

Thanks, in advance.

Antonio Gallardo.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [Auth-Framework] Using session trans before xsp generation

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Hi, many thanks for your help. Its priceless :(

After 3 days I come to my own answer. I cannot use <session:getxml> in xsp. 
Then I need to make a database query filtering with some parameter of the 
[auth-framework] this is why I need to use session:getxml before generate the 
XSP. To be I need to build to pipelines. the first is a

p1: XML -> XSL -> XML
p2: generate_xsp_from(p1) -> XSL -> HTML

More info about how to make the transformation before the XSP is procesed in:

http://www.mail-archive.com/cocoon-users@xml.apache.org/msg15373.html

Many thanks again, ;)

Antonio Gallardo.


El Martes, 24 de Septiembre de 2002 11:11, Antonio Gallardo Rivera escribió:
> Hi folks!
>
> Please, can someone help me with this. Is possible to use auth-framework
> with xsp? I am trying to make the interface to let user changes his own
> password. The problem is that I cannot use xsp to retrieve data using:
>
> <session:getxml context="authentication" path="/authentication/ID"/>
>
> or
>
> <xsp-session:getxml context="authentication" path="/authentication/ID"/>
>
> How I can do?
>
>
> Thanks, in advance.
> Antonio Gallardo.
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: [Auth-Framework] Using xsp-session and session namespaces

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Antonio Gallardo Rivera wrote:
>
> Thanks Carsten after thinking about that all the afternoon and
> half of the
> night fighting with the 2 pipelines (curently 1:00 a.m here). I
> comes to the
> same place .(
> I need a logicsheet since I am working with XSP. I am trying to
> working on
> this logicsheet since 9:00 p.m.
>
> BTW, I think many people using XSP (like me) need this
> logicshhet. I thinked
> about to write it and (if you want) built-in into Cocoon like an standard
> logicsheet that will do the same work as the well knowed
> <session:getxml>.
> What about that?
>
Sounds great!

> My main problem is how to get the SessionContext from Java in a xsl from
> scratch. I am reading and reading the Cocoon API.
>
> Now I know the packages are the:
>
> org.apache.cocoon.webapps.authentication
> org.apache.cocoon.webapps.authentication.acting
> org.apache.cocoon.webapps.authentication.components
> org.apache.cocoon.webapps.authentication.context
> org.apache.cocoon.webapps.authentication.generation
> org.apache.cocoon.webapps.authentication.selection
>
> and maybe more, who knows....
>
> I am also going into and trying to understand the Cocoon Java
> code and trying
> to write it. But I dont know how. Anyway I am a very hardhead ;)
:)

> I will try
> until I will get this, because I need it to check the permission
> of the user
> for more than 120 pages. Its a database application in Cocoon.
> Also it can
> help me to change password, etc. Maybe this can be my mastering
> in Cocoon!
> Who knows :)
Time will tell.

>
>
> I know you are very busy, but can you help me a little more just
> some tips,
> please.
>
In fact, it's not so difficult.
1. You need a component manager in your XSP - I'm not sure, but
   I think it's somehow available - I never wrote any XSP...
2. Lookup a session manager
(org.apache.cocoon.webapps.session.components.SessionManager)
3. Invoke the getContextFragment(String  contextName, String  path) method
   with contextName="authentication" and path="/???"
4. You get a DOM and have to convert it
5. Release the session manager.

HTH
Carsten


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [Auth-Framework] Using xsp-session and session namespaces

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Thanks Carsten after thinking about that all the afternoon and half of the 
night fighting with the 2 pipelines (curently 1:00 a.m here). I comes to the 
same place .(
I need a logicsheet since I am working with XSP. I am trying to working on 
this logicsheet since 9:00 p.m.

BTW, I think many people using XSP (like me) need this logicshhet. I thinked 
about to write it and (if you want) built-in into Cocoon like an standard 
logicsheet that will do the same work as the well knowed <session:getxml>. 
What about that?

My main problem is how to get the SessionContext from Java in a xsl from 
scratch. I am reading and reading the Cocoon API.

Now I know the packages are the:

org.apache.cocoon.webapps.authentication
org.apache.cocoon.webapps.authentication.acting
org.apache.cocoon.webapps.authentication.components
org.apache.cocoon.webapps.authentication.context
org.apache.cocoon.webapps.authentication.generation
org.apache.cocoon.webapps.authentication.selection

and maybe more, who knows....

I am also going into and trying to understand the Cocoon Java code and trying 
to write it. But I dont know how. Anyway I am a very hardhead ;) I will try 
until I will get this, because I need it to check the permission of the user 
for more than 120 pages. Its a database application in Cocoon. Also it can 
help me to change password, etc. Maybe this can be my mastering in Cocoon! 
Who knows :)


I know you are very busy, but can you help me a little more just some tips, 
please.

Thanks in advance,

Antonio Gallardo

El Miércoles, 25 de Septiembre de 2002 00:50, Carsten Ziegeler escribió:
> Hi,
>
> you can put the session transformer in your pipeline behind
> your serverpages generator - but then you don't have access
> to the authentication information in your xsp.
>
> If you need this, you have to write your own logicsheet
> for the authentication framework. In this logicsheet you
> can embed any java. What you have to do then is to
> lookup a session manager component and can invoke
> according methods to get the information.
>
> HTH
> Carsten
>
> > -----Original Message-----
> > From: Antonio Gallardo Rivera [mailto:agallardo@agsoftware.dnsalias.com]
> > Sent: Tuesday, September 24, 2002 7:11 PM
> > To: cocoon-users@xml.apache.org
> > Subject: [Auth-Framework] Using xsp-session and session namespaces
> >
> >
> > Hi folks!
> >
> > Please, can someone help me with this. Is possible to use
> > auth-framework with
> > xsp? I am trying to make the interface to let user changes his
> > own password.
> > The problem is that I cannot use xsp to retrieve data using:
> >
> > <session:getxml context="authentication" path="/authentication/ID"/>
> >
> > or
> >
> > <xsp-session:getxml context="authentication" path="/authentication/ID"/>
> >
> > How I can do?
> >
> >
> > Thanks, in advance.
> > Antonio Gallardo.
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: [Auth-Framework] Using xsp-session and session namespaces

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hi,

you can put the session transformer in your pipeline behind
your serverpages generator - but then you don't have access
to the authentication information in your xsp.

If you need this, you have to write your own logicsheet
for the authentication framework. In this logicsheet you
can embed any java. What you have to do then is to
lookup a session manager component and can invoke
according methods to get the information.

HTH
Carsten

> -----Original Message-----
> From: Antonio Gallardo Rivera [mailto:agallardo@agsoftware.dnsalias.com]
> Sent: Tuesday, September 24, 2002 7:11 PM
> To: cocoon-users@xml.apache.org
> Subject: [Auth-Framework] Using xsp-session and session namespaces
> 
> 
> Hi folks!
> 
> Please, can someone help me with this. Is possible to use 
> auth-framework with 
> xsp? I am trying to make the interface to let user changes his 
> own password. 
> The problem is that I cannot use xsp to retrieve data using:
> 
> <session:getxml context="authentication" path="/authentication/ID"/>
> 
> or
> 
> <xsp-session:getxml context="authentication" path="/authentication/ID"/>
> 
> How I can do?
> 
> 
> Thanks, in advance.
> Antonio Gallardo.
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


[Auth-Framework] Using xsp-session and session namespaces

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Hi folks!

Please, can someone help me with this. Is possible to use auth-framework with 
xsp? I am trying to make the interface to let user changes his own password. 
The problem is that I cannot use xsp to retrieve data using:

<session:getxml context="authentication" path="/authentication/ID"/>

or

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

How I can do?


Thanks, in advance.
Antonio Gallardo.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>