Re: manage the sessions ?

2003-03-17 Thread Lionel Crine
I have these two books.
I want to manage the sessions in the pipeline.


At 14:55 17/03/2003 +0100, you wrote:
You can use  for this.

Docs: the website under XSP / Session
Two good books:
Cocoon, Building XML applications (Langham / Ziegeler)
Cocoon, Developer's handbook (Moczar / Aston)
> What actions should I use ?
> How does they act between the pipeline ?
> Is there any documentation, besides besides these on the cocoon site ?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Met vriendelijke groeten,
Kind regards,
Bien à vous,
Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be
Quote: The winner never says participating is more important than winning.

-
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]


Re: manage the sessions ?

2003-03-17 Thread Yves Vindevogel
You can use  for this.

Docs: the website under XSP / Session
Two good books: 
Cocoon, Building XML applications (Langham / Ziegeler)
Cocoon, Developer's handbook (Moczar / Aston)

> What actions should I use ?
> How does they act between the pipeline ?
> Is there any documentation, besides besides these on the cocoon site ?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.

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



manage the sessions ?

2003-03-17 Thread Lionel Crine
What actions should I use ?
How does they act between the pipeline ?
Is there any documentation, besides besides these on the cocoon site ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: and JAVA sessions

2003-02-26 Thread Marco Rolappe
from within an XSP you can have a session be created by specifying the
's attribute @create-session="true" (this is handled by the
session logicsheet. this way a session will be created if it didn't yet
exist.

problems can occur with these sessions, though; sessions created by the
session logicsheet from within the XSP are created when actual generation
begins, i.e. after pipeline setup. thus, transformers in the pipeline (for
which the XSP is the generator) won't see the session instantly.

your safest bet is to create the session before the generator step (e.g. via
an action) and have the generator access this one via the session
logicsheet.

> -Ursprungliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von [EMAIL PROTECTED]
> Gesendet: Mittwoch, 26. Februar 2003 12:38
> An: [EMAIL PROTECTED]
> Betreff:  and JAVA sessions
>
>
> What is the difference between these two sessions??? :
>
>
> JAVA session:
> 
>  org.apache.cocoon.environment.Session
> 
> ...
> 
>  Session session = null;
>  ...
>  session = request.getSession(true);
>  session.setAttribute("user",user);
> ...
> 
>
> --
>
> XSP SESSION:
>   xmlns:xsp="http://apache.org/xsp";
>  xmlns:session="http://apache.org/xsp/session/2.0";
> >
> ...
>  name="user">user
> ...
>
>
>
> Is there a way to create and set a JAVA session and then get an
> attribute with session-xsp, like
> 
>
>
> -
> 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]



and JAVA sessions

2003-02-26 Thread Maxime.Gheysen
What is the difference between these two sessions??? :


JAVA session:

 org.apache.cocoon.environment.Session

...

 Session session = null;
 ...
 session = request.getSession(true);
 session.setAttribute("user",user);
...


--

XSP SESSION:
http://apache.org/xsp";
 xmlns:session="http://apache.org/xsp/session/2.0"; 
>
...
user
...


  
Is there a way to create and set a JAVA session and then get an
attribute with session-xsp, like



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



Re: Sessions and

2002-12-20 Thread Christian Haul
On 20.Dec.2002 -- 09:23 AM, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I'm checking in the  part if a  load this, else load that. Is there a way to do some kind of that.
> I'm trying to restrict a page. Or is there a other approach.

I would suggest to put both branches into different files and guard
the protected case with an action that verifies the condition. 

Cocoon comes with a number of actions that provide such
functionality. Out of my head you may want to look at the
authentication framework or the SessionValidatorAction.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

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




Re: Sessions and

2002-12-20 Thread Johannes . Becker

Unfortuneatly I don't know anything about( container based
authentication). I tried cocoon authentification, but it didn't work.
I pretty new to web-based stuff and cocoon.

regards,
Jonny



This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.



|-+>
| |   SAXESS - Hussayn |
| |   Dabbous  |
| |   <[EMAIL PROTECTED]|
| |   om>  |
| ||
| |   12/20/02 09:56 AM|
| |   Please respond to|
| |   cocoon-users |
| ||
|-+>
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]
  |
  |   cc:  
  |
  |   Subject:  Re: Sessions and
  |
  
>--|






[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm checking in the  part if a  load this, else load that. Is there a way to do some kind of that.
> I'm trying to restrict a page. Or is there a other approach.
>

If you only want to restrict a page, why not simply setting up
an authentication framework? I did it with container based
authentication, but never tried with cocoon-authentication.

If you want to differently on different restricted pages, my approach
does not work well. Maybe this can be done much better with
cocoon authentication.

By the way, does it make sense to split this task as follows:

use the container for authentication
use cocoon for authorisation

By this i could build up very sophisticated authorisation
schemes while letting the container bother with the login...

If this makes sense i would be interested how this could be
set up.

regards, hussayn

> My non functioning approach:
>
> 
>xmlns:xsp="http://apache.org/xsp";
>   xmlns:xsp-session="http://apache.org/xsp/session/2.0";>
> 
>   
>   
> Portal
>   
>   
> if( != null)
> {
>   
>  ...
> }
> else
> {
> 
>   
>   
> 
>   Login failed
> 
>   
> }
>   
> 
> 
>
>
> Thanks
> Jonny
>


>
> This electronic message contains information from the mmo2 plc Group
which
> may be
> privileged or confidential. The information is intended to be for the use
> of the
> individual(s) or entity named above. If you are not the intended
recipient
> be aware
> that any disclosure, copying, distribution or use of the contents of this
> information
> is prohibited. If you have received this electronic message in error,
> please notify
> us by telephone or email (to the numbers or address above) immediately.
>
>
>
>
> -
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


-
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: <[EMAIL PROTECTED]>
For additional co

Re: Sessions and

2002-12-20 Thread SAXESS - Hussayn Dabbous


[EMAIL PROTECTED] wrote:

Hi,

I'm checking in the  part if a 

If you only want to restrict a page, why not simply setting up
an authentication framework? I did it with container based
authentication, but never tried with cocoon-authentication.

If you want to differently on different restricted pages, my approach
does not work well. Maybe this can be done much better with
cocoon authentication.

By the way, does it make sense to split this task as follows:

use the container for authentication
use cocoon for authorisation

By this i could build up very sophisticated authorisation
schemes while letting the container bother with the login...

If this makes sense i would be interested how this could be
set up.

regards, hussayn


My non functioning approach:


http://apache.org/xsp";
  xmlns:xsp-session="http://apache.org/xsp/session/2.0";>

  
  
Portal
  
  
if( != null)
{
  
  
  
  

  Login failed

  
}
  




Thanks
Jonny


This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




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

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




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

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




Sessions and

2002-12-20 Thread Johannes . Becker
Hi,

I'm checking in the  part if a 
http://apache.org/xsp";
  xmlns:xsp-session="http://apache.org/xsp/session/2.0";>

  
  
Portal
  
  
if( != null)
{
  
  
  
  

  Login failed

  
}
  




Thanks
Jonny


This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




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

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




Re: [Authentication] - User with mixed Sessions

2002-12-05 Thread Antonio Gallardo
Christoph:

Many thanks for the help you provided. Today I will confirm if the problem
was related to the problem in the "multithreading" of Cocoon or if I have
a bug into my code.

If everything is fine I will try to turn on the proxy again to improve the
performance. Since there are no more than 40 users. I think this is not
urgent to turn the proxy on. But I think we need to know if Cocoon will
work or not with the proxy turned on.

As long as I reserched, the cookies must be enough to keep the track of
the users' sessions. On the page 303 of the book "Cocoon: Building XML
Applications" states:

"The default is usually to use cookies because the developer of the web
application does not need to do anything special to use them"

To assure the authentication is the only one that creates sessions and I
am using also the XSP Session LogicSheet. I was also explicitly turned off
the generation of new sessions in my XSP pages with:

xmlns:xsp-session="http://apache.org/xsp/session/2.0"; create-session="false">

Best regards,

Antonio Gallardo.





Christoph Gaffga dijo:
>> Where I can configure for all the pages the
>> response.setHeader("Cache-Control", "No-Cache");
>
> I'm using a filter for that:
>
> in my web.xml-file:
>   
> ModifyRequest
>
> com.triplemind.asp.server.ModifyRequestFilter
>   
>   
> ModifyRequest
> Cocoon2
>   
>
> And a short Filter-Class:
>   package com.triplemind.asp.server;
>   import javax.servlet.Filter;
>   import javax.servlet.FilterChain;
>   import javax.servlet.FilterConfig;
>   import javax.servlet.ServletRequest;
>   import javax.servlet.ServletResponse;
>
>   public class ModifyRequest implements Filter {
> private FilterConfig filterConfig = null;
> public ModifyRequest() { }
> public void init(FilterConfig filterConfig) {
>   this.filterConfig = filterConfig;
> }
> public void doFilter(ServletRequest request,
>  ServletResponse response,
>  FilterChain chain) {
>   try {
> response.setHeader("Cache-Control", "No-Cache");
> chain.doFilter(request, response);
>   } catch(Exception e) {
> e.printStackTrace();
>   }
> }
> public void destroy() { }
>   }
>
> hope, that helps.
> I put some more features in my ModfiyRequest, to change the Request-URL,
> and Cookies and put some more Header-Information, such as
> Expires-Headers.
>
> Christoph Gaffga
> [EMAIL PROTECTED]
>
>
> - Original Message -
> From: "Antonio Gallardo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, November 30, 2002 8:25 PM
> Subject: Re: [Authentication] - Generate javascript using XSP
>
>
>> Where I can configure for all the pages the
>>
>> response.setHeader("Cache-Control", "No-Cache");
>>
>> Can I put it into the header of the HTML in my XSL?
>>
>> Regards,
>>
>> Antonio Gallardo
>>
>> Christoph Gaffga dijo:
>> > Hi,
>> >
>> >> I think that this can be done because the proxy is returning a
>> cached page from another user. Because the request has the same URI
>> from every user (as long as I can see). The request URI does not
>> have info about sessions.
>> >
>> > If you are behind a proxy maybe you can configure it not to cache
>> urls at http://internalserver:8080/theapp/.
>> > Or it helps if you do
>> > response.setHeader("Cache-Control", "No-Cache");
>> >
>> > yours
>> > Christoph Gaffga
>> > [EMAIL PROTECTED]
>> >
>> > - Original Message -
>> > From: "Antonio Gallardo" <[EMAIL PROTECTED]>
>> > To: <[EMAIL PROTECTED]>
>> > Sent: Saturday, November 30, 2002 9:32 AM
>> > Subject: [Authentication] - Generate javascript using XSP
>> >
>> >
>> >> Hi Cococoners!
>> >>
>> >> I am currently an application that is currently running on a test
>> mode with a small amount of users (20) in a Intranet environment.
>> With the following characteristics:
>> >>
>> >> The application is running behind a proxy.
>> >> The app use the authentication framework.
>> >> The app have a page called welcome that show the current user.
>> >>
>> >> I am currently having problem with session management:
>> >>
>> >> The users told me that sometimes when they are already
>> authenticated and request

[2.1] - About Sessions

2002-12-03 Thread Antonio Gallardo
Hi Cocooners!

I am trying to fix an error in the . See in bugzilla (13070).

Can someone explain if in the current 2.1 CVS is a different approach to
get session context from the following interfaces:

xsp-session
sesion-fw-block
authentication-fw-block
portal-fw-block

Will be possible in the future access the authentication framework using XSP?

Thanks in advance,

Antonio Gallardo



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

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




RE: Sessions (read please!)

2002-11-29 Thread Mauro Daniel Ardolino
First of all, thanks for answering!

Well, I'm using servlets, not XSPs (I know this are servlets too, but not
HttpServlets).  So, I'm using HttpServlets.  I'm doing just as you say to
put something in a session.  Then I try to restore this parameter from
another servlet.  This is the snip of the configuration of the second
servlet extracted from the sitemap:


http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 




It works fine (the servlet), but it cannot retrieve the "cart" from
the session.  Also I think it cannot retrieve the session.

The answer is:
"Must I do something special in the sitemap to pass the session to 
this servlet?"

Thanks a lot and ask me for anything you do not understand of my poor
explanation.

-- Mauro



On Fri, 29 Nov 2002, "Kazmír, Jaroslav" wrote:

> I don't know, how it's with the servlets, but I use for the session this:
> 
> private Session session;
> ...
> session = request.getSession();
> session.setAttribute("cart", "true");
> 
> But I don't understand, where you would like to check this session in your
> next step. I check my session in another java class or in XSP file.
> 
> JayKay
> 
> -Original Message-
> From: Mauro Daniel Ardolino [mailto:[EMAIL PROTECTED]] 
> Sent: Freitag, 29. November 2002 15:15
> To: [EMAIL PROTECTED]
> Subject: Re: Sessions (read please!)
> 
> Hi! third time.  I'm still stuck.  May be the subject is not interesting,
> or may be no one is working with cocoon, servlets and session attributes.
> HELP! (read below).
> 
> Thanks, and sorry for insisting.
> 
> -- Mauro
> 
> On Fri, 22 Nov 2002, Mauro Daniel Ardolino wrote:
> 
> > Hi again!  I'm still stuck.  I've tried a lot of things without success.
> > Does anyone work with cocoon and servlets, and session attributes?
> > If so, please read below (my previous mail)! thanks!
> > 
> > -- Mauro
> > 
> > On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote:
> > 
> > > Hi! I have a problem using cocoon with other servlets.
> > > I have a servlet that outputs a xml and then in a pipeline I apply a xsl
> > > transformation.  This works well, but this servlet needs a session
> > > parameter.
> > > 
> > > Inside the servlet I wrote:
> > > 
> > > HttpSession session= request.getSession();
> > > TreeMap cart= (TreeMap) session.getAttribute("cart")
> > > 
> > > But I cannot obtain the "cart" parameter.  If I put the "false"
> parameter
> > > to the request.getSession(), I obtain an exception.
> > > 
> > > So I have to think that cocoon is not passing the session to this
> servlet.
> > > I have to say that other servlet adds the "cart" parameter to the
> session,
> > > of course.
> > > 
> > > Here's a copy of the pipeline:
> > > 
> > > 
> > >src="http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
> > >   
> > >   
> > > 
> > > 
> > > Must I do something special to pass the session to this servlet?
> > > (the servlet url is
> "http://delta:18080/ProductSelectionDemo1/checkoutPage";)
> > > 
> > > Thanks in advance.
> > > 
> > > -- Mauro
> > > 
> > > 
> > 
> > 
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: [EMAIL PROTECTED]
website: http://www.altersoft.com.ar



-
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: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Antw: Re: Sessions (read please!)

2002-11-29 Thread Martin Geissler
Hello,
i don t use servlets but JSPs

have the following code:

1. xsp Document
  
org.apache.cocoon.environment.Session
  
...
Session session = request.getSession (false);
if (session != null) {
// delet od session
session.invalidate ();
}
// create new session
session = request.getSession (true);
session.setAttribute ("props", properties);
session.setAttribute ("user", user);
session.setMaxInactiveInterval(3600); // 1 houer

...
2. Session in JSP page or xsp page
HTTPSession is a default class in a JSP page!(?)
<%
  HttpSession session = request.getSession (false);
  // When there's no session and no user object tell person in front of
the screen so
if (session != null && session.getAttribute ("user") != null) 
{

User user = (User)session.getAttribute ("user");
}
else
{
...
}  

JSP in sitemap as JSPreader, not JSPgenerator, cause i first developed
JSPs and then changed to cocoon

hth

Martin Geißler

>>> [EMAIL PROTECTED] Freitag, 29. November 2002 15:15:10 >>>
Hi! third time.  I'm still stuck.  May be the subject is not
interesting,
or may be no one is working with cocoon, servlets and session
attributes.
HELP! (read below).

Thanks, and sorry for insisting.

-- Mauro

On Fri, 22 Nov 2002, Mauro Daniel Ardolino wrote:

> Hi again!  I'm still stuck.  I've tried a lot of things without
success.
> Does anyone work with cocoon and servlets, and session attributes?
> If so, please read below (my previous mail)! thanks!
> 
> -- Mauro
> 
> On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote:
> 
> > Hi! I have a problem using cocoon with other servlets.
> > I have a servlet that outputs a xml and then in a pipeline I apply
a xsl
> > transformation.  This works well, but this servlet needs a session
> > parameter.
> > 
> > Inside the servlet I wrote:
> > 
> > HttpSession session= request.getSession();
> > TreeMap cart= (TreeMap) session.getAttribute("cart")
> > 
> > But I cannot obtain the "cart" parameter.  If I put the "false"
parameter
> > to the request.getSession(), I obtain an exception.
> > 
> > So I have to think that cocoon is not passing the session to this
servlet.
> > I have to say that other servlet adds the "cart" parameter to the
session,
> > of course.
> > 
> > Here's a copy of the pipeline:
> > 
> > 
> > http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
> > 
> > 
> > 
> > 
> > Must I do something special to pass the session to this servlet?
> > (the servlet url is
"http://delta:18080/ProductSelectionDemo1/checkoutPage";)
> > 
> > Thanks in advance.
> > 
> > -- Mauro
> > 
> > 
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: [EMAIL PROTECTED] 
website: http://www.altersoft.com.ar 


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

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


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

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




Re: Sessions (read please!)

2002-11-29 Thread Mauro Daniel Ardolino
Hi! third time.  I'm still stuck.  May be the subject is not interesting,
or may be no one is working with cocoon, servlets and session attributes.
HELP! (read below).

Thanks, and sorry for insisting.

-- Mauro

On Fri, 22 Nov 2002, Mauro Daniel Ardolino wrote:

> Hi again!  I'm still stuck.  I've tried a lot of things without success.
> Does anyone work with cocoon and servlets, and session attributes?
> If so, please read below (my previous mail)! thanks!
> 
> -- Mauro
> 
> On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote:
> 
> > Hi! I have a problem using cocoon with other servlets.
> > I have a servlet that outputs a xml and then in a pipeline I apply a xsl
> > transformation.  This works well, but this servlet needs a session
> > parameter.
> > 
> > Inside the servlet I wrote:
> > 
> > HttpSession session= request.getSession();
> > TreeMap cart= (TreeMap) session.getAttribute("cart")
> > 
> > But I cannot obtain the "cart" parameter.  If I put the "false" parameter
> > to the request.getSession(), I obtain an exception.
> > 
> > So I have to think that cocoon is not passing the session to this servlet.
> > I have to say that other servlet adds the "cart" parameter to the session,
> > of course.
> > 
> > Here's a copy of the pipeline:
> > 
> > 
> > http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
> > 
> > 
> > 
> > 
> > Must I do something special to pass the session to this servlet?
> > (the servlet url is "http://delta:18080/ProductSelectionDemo1/checkoutPage";)
> > 
> > Thanks in advance.
> > 
> > -- Mauro
> > 
> > 
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: [EMAIL PROTECTED]
website: http://www.altersoft.com.ar


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

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




Re: Sessions

2002-11-22 Thread Mauro Daniel Ardolino
Hi again!  I'm still stuck.  I've tried a lot of things without success.
Does anyone work with cocoon and servlets, and session attributes?
If so, please read below (my previous mail)! thanks!

-- Mauro

On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote:

> Hi! I have a problem using cocoon with other servlets.
> I have a servlet that outputs a xml and then in a pipeline I apply a xsl
> transformation.  This works well, but this servlet needs a session
> parameter.
> 
> Inside the servlet I wrote:
> 
> HttpSession session= request.getSession();
> TreeMap cart= (TreeMap) session.getAttribute("cart")
> 
> But I cannot obtain the "cart" parameter.  If I put the "false" parameter
> to the request.getSession(), I obtain an exception.
> 
> So I have to think that cocoon is not passing the session to this servlet.
> I have to say that other servlet adds the "cart" parameter to the session,
> of course.
> 
> Here's a copy of the pipeline:
> 
> 
>   http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
>   
>   
> 
> 
> Must I do something special to pass the session to this servlet?
> (the servlet url is "http://delta:18080/ProductSelectionDemo1/checkoutPage";)
> 
> Thanks in advance.
> 
> -- Mauro
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: [EMAIL PROTECTED]
website: http://www.altersoft.com.ar


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

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




Sessions

2002-11-18 Thread Mauro Daniel Ardolino
Hi! I have a problem using cocoon with other servlets.
I have a servlet that outputs a xml and then in a pipeline I apply a xsl
transformation.  This works well, but this servlet needs a session
parameter.

Inside the servlet I wrote:

HttpSession session= request.getSession();
TreeMap cart= (TreeMap) session.getAttribute("cart")

But I cannot obtain the "cart" parameter.  If I put the "false" parameter
to the request.getSession(), I obtain an exception.

So I have to think that cocoon is not passing the session to this servlet.
I have to say that other servlet adds the "cart" parameter to the session,
of course.

Here's a copy of the pipeline:


http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 




Must I do something special to pass the session to this servlet?
(the servlet url is "http://delta:18080/ProductSelectionDemo1/checkoutPage";)

Thanks in advance.

-- Mauro

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: [EMAIL PROTECTED]
website: http://www.altersoft.com.ar


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

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




Sessions stomping on xsp:init-page!!

2002-11-08 Thread Sonny Sukumar

Hi guys,

I found that if I put the xmlns:xsp-session="http://apache.org/xsp/session/2.0"; 
namespace in any XSP document, then xsp-init-page tag isn't processed.  Thus, all the 
variables I declare/initialize in xsp-init-page (which should go at the start of 
generate()) are nonexistent, which obviously causes compilation problems.  

The only thing that gets put at the start of the generate method is: 
Session session = request.getSession(true);.

Anybody know how to keep this from happening??

Btw, I'm using:
Cocoon 2.0.3
Tomcat 4.1.12
Redhat 7.3

Thanks!

Sonny

_
Conserve wilderness with a click (free!) and get your own EcologyFund.net email 
(free!) at http://www.ecologyfund.com.

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP & more! http://www.everyone.net/selectmail?campaign=tag

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

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




Why sometimes there are 2 Sessions?

2002-09-29 Thread Antonio Gallardo Rivera

Sometimes I get two session, and then the authentication fail (does not work 
correctly).

For example:

PARAM: 'cookie' VALUES: '[JSESSIONID=7F01BDD09F2AE25B7F284E2F8674A60B; 
JSESSIONID=3D2494A5DD7F97F280BAD12D0343BFC4]'

As you can see there are 2 sessions.

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: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Non XSP Sessions ...

2002-08-21 Thread Carsten Ziegeler

The cocoon.webapps.session package provides a session action for
creating/terminating a session and a session transformer to
store XML data in  a session and retrieve this data from a 
session.
You don't need XSP for this.

HTH
Carsten

> -Original Message-
> From: Todd Densmore [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 4:14 PM
> To: '[EMAIL PROTECTED]'
> Subject: Non XSP Sessions ...
> 
> 
> Has anyone implemented sessions in cocoon that dont use the session
> logicsheet? I really dont want to use an XSP logicsheet (just like I dont
> want to use JSP or ASP) at all, and I was wondering if anyone had an easy
> way to do it.
> 
> -
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

-
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: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Non XSP Sessions ...

2002-08-21 Thread Todd Densmore

Has anyone implemented sessions in cocoon that dont use the session
logicsheet? I really dont want to use an XSP logicsheet (just like I dont
want to use JSP or ASP) at all, and I was wondering if anyone had an easy
way to do it.

-
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: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Transforming URL Requests (was: Form Question and Sessions from20.06.2002)

2002-06-23 Thread Ivelin Ivanov


Bartlomiej,


I don't have an immediate solution for your problem, but I am currently 
working on a new generator: HttpProxyGenerator.

It is specifically intended to allow easy integration of XML content 
across multiple portals. The original idea was an extention to XMLForm 
which would allow interaction between an end user and a portal, where 
the logic and content is provided by a third party vendor.

The implementation will be based on Jakarta HttpClient to allow more 
sophisticated connection handling, request manipulation, redirects 
following, session handling, login,  etc.

I am glad that you reached to the same idea independently.
Maybe you can help me iron out the requirements.

Can you describe the use case scenario for the problem you're trying to 
solve.

What markup do you use for form submission to Cocoon and then to the 
perl server? Have you considered XForms?
http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html



Regards,


Ivelin




Bartlomiej Frackiewicz wrote:
> Hi folks,
> 
> sorry for my re-posting, but my problem still exists and makes me headache.
> 
> i want to transform dynamic xml, which i generate with url requests like 
>http://cart.my.server/perl/GetMyCart?sessionID=lala, so my current sitemap:
> 
> 
>   
> 
> http://cart.my.server/perl/GetMyCart{requestQuery}"/>
> 
> 
> 
>   
>   
> 
> 
> works fine, but i need to post data and than this solution does not work. so i have 
>learned this weekend the xsp pages, and thought this would work in a xsp page:
> 
>  :-)
>   URL u = new URL("http://cart.my.server/perl/GetMyCart?sessionID=lala";);
>   HttpURLConnection huc = (HttpURLConnection) u.openConnection();
>   huc.setRequestMethod("POST
>   huc.connect();
>   
>   InputStream in = huc.getInputStream();
>   
>   int c;
>   while ((c = in.read()) != -1) {
> text.append((char)c);
>   } 
> 
>   ..
> 
>   return text.toString();
> 
> 
> but this is not interpreted as xml, it is already well-formed and all chars are 
>escaped (i. e. <) so my xslt transformer nothing matches, btw i am not a java 
>programmer so don't laugh about my code. what is the trick here? can i use jsp-pages 
>(which currently do not run on my tomcat3/cocoon2 server) to print out the clear xml, 
>must i use the Stream Generator (which i absolutly don't understand how this work), 
>or is this not possible with core cocoon?
> 
> please point me to the right direction, i thank you in advance.
> 
> happy coding, bart
> 
> p.s. here is an example of an request to 
>http://cart.my.server/perl/GetMyCart?sessionID=lala copied out of internet explorer.
> 
>  
> 
>  
>   1024848144s27995 
>   lala 
>   
>   1 
>   ger 
>   lala 
>   
>  
>  
>   
>  
> 
> 
> 



-- 

-= Ivelin =-


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

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




Transforming URL Requests (was: Form Question and Sessions from 20.06.2002)

2002-06-23 Thread Bartlomiej Frackiewicz

Hi folks,

sorry for my re-posting, but my problem still exists and makes me headache.

i want to transform dynamic xml, which i generate with url requests like 
http://cart.my.server/perl/GetMyCart?sessionID=lala, so my current sitemap:


  

http://cart.my.server/perl/GetMyCart{requestQuery}"/>



  
  


works fine, but i need to post data and than this solution does not work. so i have 
learned this weekend the xsp pages, and thought this would work in a xsp page:

 :-)
  URL u = new URL("http://cart.my.server/perl/GetMyCart?sessionID=lala";);
  HttpURLConnection huc = (HttpURLConnection) u.openConnection();
  huc.setRequestMethod("POST
  huc.connect();

  InputStream in = huc.getInputStream();
  
  int c;
  while ((c = in.read()) != -1) {
text.append((char)c);
  }   

  ..

  return text.toString();


but this is not interpreted as xml, it is already well-formed and all chars are 
escaped (i. e. <) so my xslt transformer nothing matches, btw i am not a java 
programmer so don't laugh about my code. what is the trick here? can i use jsp-pages 
(which currently do not run on my tomcat3/cocoon2 server) to print out the clear xml, 
must i use the Stream Generator (which i absolutly don't understand how this work), or 
is this not possible with core cocoon?

please point me to the right direction, i thank you in advance.

happy coding, bart

p.s. here is an example of an request to 
http://cart.my.server/perl/GetMyCart?sessionID=lala copied out of internet explorer.

 

 
  1024848144s27995 
  lala 
  
  1 
  ger 
  lala 
  
 
 
  
 



-- 
BARTLOMIEJ M. FRACKIEWICZ
systementwickler
inity - agentur fuer neue medien gmbh 
birkenstrasse 71  
40233 duesseldorf

telefon: 0211-99199-0
fax: 0211-99199-10
e-mail: [EMAIL PROTECTED]


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

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




RE: Generating XML with URLs that use Sessions

2002-06-12 Thread Vadim Gritsenko




Vadim

--
Resistance is futile. 

> -Original Message-
> From: Holden Robbins [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 12, 2002 10:14 PM
> To: [EMAIL PROTECTED]
> Subject: Generating XML with URLs that use Sessions
> 
> 
> Hi,
> 
> I've recently come across a major stumbling block in converting my
servlet
> based site to use Cocoon.  I'm hoping to use cocoon instead of having
each
> individual servlet having the XSL transformations hard coded and doing
it
> themselves.
> 
> The problem is that the servlets use session variables and the
JSessionId
> cookie is lost when the URL of the servlet is called through cocoon
file
> generator.
> 
>   0/---\   /---\
>  /|\   JSessionID  |   |  nada |   |
>   |->  |   |  -->  |   |
>  / \   \---/   \---/
> 
> Client Cocoon Servlets
> File Generator
> 
> 
> I don't see any way to set headers or get headers from cocoon
generators.
> Which means I can't grab the JSessionId from the header in the
response
> returned by the servlet and I can't set the JSessionId in the header
for
> the request to the servlet.
> 
> Is there an easy solution to this problem that I'm missing?

1. Have your servlets deployed together with Cocoon in one webapp

2.
...

  http://host:port/cocoon/old-servlet;jsessionid={session-id}"/>

...

should work.


Vadim


> 
> My only choice seem to be re-write each of the servlets as a cocoon
> generator which I'm not sure I want to do.
> 
> Thanks,
> -Holden
> 


-
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: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Generating XML with URLs that use Sessions

2002-06-12 Thread Holden Robbins


Hi, 

I've recently come across a major stumbling block in converting my servlet
based site to use Cocoon.  I'm hoping to use cocoon instead of having each
individual servlet having the XSL transformations hard coded and doing it
themselves. 

The problem is that the servlets use session variables and the JSessionId
cookie is lost when the URL of the servlet is called through cocoon file
generator. 

  0/---\   /---\
 /|\   JSessionID  |   |  nada |   |
  |->  |   |  -->  |   |
 / \   \---/   \---/

Client Cocoon Servlets
File Generator


I don't see any way to set headers or get headers from cocoon generators. 
Which means I can't grab the JSessionId from the header in the response
returned by the servlet and I can't set the JSessionId in the header for
the request to the servlet. 

Is there an easy solution to this problem that I'm missing?  

My only choice seem to be re-write each of the servlets as a cocoon
generator which I'm not sure I want to do. 

Thanks,
-Holden


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

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




Re: sessions in cocoon

2002-05-29 Thread Ivan Luzyanin

On óÒÄ, 2002-05-29 at 17:05, Atul Gulve wrote:
> If you want to access session object then you should do it following way in 
> cocoon.
> 
> In your xsp file you can access the session.
> 
> org.apache.cocoon.environment.http.HttpSession session = 
> (org.apache.cocoon.environment.http.HttpSession)request.getSession();
> 
> Object foo = session.getAttribute("foobar");
> .
> .
> .
> .
> 

Actually is no need to get session object from request object. Session
object is ready to use from XSP's by using "session" variable.




Object foo = session.getAttribute("foobar");




Ivan.


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

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




Re: sessions in cocoon

2002-05-29 Thread Atul Gulve

If you want to access session object then you should do it following way in 
cocoon.

In your xsp file you can access the session.

org.apache.cocoon.environment.http.HttpSession session = 
(org.apache.cocoon.environment.http.HttpSession)request.getSession();

Object foo = session.getAttribute("foobar");
.
.
.
.



From: "Christoph Stocker" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: sessions in cocoon
Date: Wed, 29 May 2002 15:35:21 +0200

hi!

can someone give an example to implement session-handling or tracking
in cocoon.

greetings, chris


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

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



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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




Re: sessions in cocoon

2002-05-29 Thread Ivan Luzyanin

On óÒÄ, 2002-05-29 at 16:35, Christoph Stocker wrote:
> hi!
> 
> can someone give an example to implement session-handling or tracking
> in cocoon.
> 
> greetings, chris
> 
there are some small examples in Cocoon API documentation for session
handing and tracking (i.e. SessionIsValidAction, SessionValidatorAction,
SessionStateAction)

P.S. You can find Cocoon API documentation in distribution package.


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

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




sessions in cocoon

2002-05-29 Thread Christoph Stocker

hi!

can someone give an example to implement session-handling or tracking
in cocoon.

greetings, chris


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

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




sessions with cocoon

2002-05-29 Thread Christoph Stocker

hi all!

i read the cocoon session-handling manuals - but ...

what's the best way to implement sessionhandling or sessiontracking
in cocoon. 

can someone give a HowTo to implement this.

THANKS!
greetings, chris


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

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




RE: using C2 to read sessions from JBoss/Tomcat

2002-04-11 Thread Mark S. Kent

Thanks, Vadim. I'll check it out.

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 4:11 PM
To: [EMAIL PROTECTED]; Mark Kent
Subject: RE: using C2 to read sessions from JBoss/Tomcat


> From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
> 
> Vadim,
> 
> Using the JBoss-2.4.4_Tomcat-4.0.1 package starts Tomcat "within" the
JBoss
> instance (I think).  The "jboss/deploy" folder has:
> 
> + cocoon.war (folder)
>   -- (contains same contents as standard tomcat/webapps/cocoon folder)
> + lib (folder)
>   -- jbosspool-jdbc.jar
>   -- jms-ra.jar
> + web.war (folder)
>   -- (contains all my JSP and webfiles [images/css/etc] )
> cl.jar (file -- a jar with my ejbs)
> deploy.txt (text file)
> 
> So, I would think that these two (cocoon.war and cl.jar) are deployed
> "separately" within the JBoss context so that they would not "see"
each
> other's session variables.  Does that sound right to you?

Almost. You wrote that cl.jar contains EJBs. How do you access servlet
container session object from an EJB? AFAIR, this is not possible.

I would assume that you mean session created in your web.war file.


> If so, is there a way to start the cl.jar "within" the web.war
"webapp" (or
> vice versa) so that they can share session variables?

You just need to merge both of your web applications into one web
application (read: one session manager, see also
jakarta-tomcat\webapps\tomcat-docs\config\manager.html), which includes
merging of classes, libs, web.xml, and all other resources in one web
application file (or directory: you always can work with directory
instead of huge file, which gives you much faster development
turn-around).

Hope I'm clear.


Vadim

> I'm trying to get a similar question answered as well on the JBoss
forum,
> and can take this discussion there if need be.  Thanks for your help!
> 
> Mark
> 
> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 2:49 PM
> To: [EMAIL PROTECTED]; Mark Kent
> Subject: RE: using C2 to read sessions from JBoss/Tomcat
> 
> 
> > From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
> >
> > I'm testing the JBoss-2.4.4_Tomcat-4.0.1 package with Cocoon2 and
I'm
> trying
> > to get Cocoon to read an user's session name variable (employeeData)
> created
> > by the login process.  Can Cocoon2 read the session information from
the
> > JB/TC "instance"? (sorry if that is not the right terminology)
> 
> (IIRC) Yes, if "login process" resides in the *same* webapp where
cocoon
> is deployed.
> 
> 
> > I can see where Cocoon can perform tasks using it's own "session"
> variables,
> 
> Cocoon's session is servlet session.
> 
> Vadim
> 
> > but I would like to use the ones created in Tomcat to get the
current
> user's
> > employee profile (i.e. "company_id", etc.) that was created when
they
> logged
> > in.
> >
> > This version of JBoss/Tomcat has Cocoon2 running as a cocoon.war
file from
> > the $JBOSS_HOME/deploy folder.
> >
> > If this is the wrong place to post this, I understand and will post
> > elsewhere, but I'm trying to understand how these all work together
and
> > since they are all used through the jboss/deploy folder, whether
they
> share
> > any common variables/memory/jvm data/etc.
> >
> > Thanks!
> > Mark
> >
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


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

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


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

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




RE: using C2 to read sessions from JBoss/Tomcat

2002-04-11 Thread Vadim Gritsenko

> From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
> 
> Vadim,
> 
> Using the JBoss-2.4.4_Tomcat-4.0.1 package starts Tomcat "within" the
JBoss
> instance (I think).  The "jboss/deploy" folder has:
> 
> + cocoon.war (folder)
>   -- (contains same contents as standard tomcat/webapps/cocoon folder)
> + lib (folder)
>   -- jbosspool-jdbc.jar
>   -- jms-ra.jar
> + web.war (folder)
>   -- (contains all my JSP and webfiles [images/css/etc] )
> cl.jar (file -- a jar with my ejbs)
> deploy.txt (text file)
> 
> So, I would think that these two (cocoon.war and cl.jar) are deployed
> "separately" within the JBoss context so that they would not "see"
each
> other's session variables.  Does that sound right to you?

Almost. You wrote that cl.jar contains EJBs. How do you access servlet
container session object from an EJB? AFAIR, this is not possible.

I would assume that you mean session created in your web.war file.


> If so, is there a way to start the cl.jar "within" the web.war
"webapp" (or
> vice versa) so that they can share session variables?

You just need to merge both of your web applications into one web
application (read: one session manager, see also
jakarta-tomcat\webapps\tomcat-docs\config\manager.html), which includes
merging of classes, libs, web.xml, and all other resources in one web
application file (or directory: you always can work with directory
instead of huge file, which gives you much faster development
turn-around).

Hope I'm clear.


Vadim

> I'm trying to get a similar question answered as well on the JBoss
forum,
> and can take this discussion there if need be.  Thanks for your help!
> 
> Mark
> 
> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 2:49 PM
> To: [EMAIL PROTECTED]; Mark Kent
> Subject: RE: using C2 to read sessions from JBoss/Tomcat
> 
> 
> > From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
> >
> > I'm testing the JBoss-2.4.4_Tomcat-4.0.1 package with Cocoon2 and
I'm
> trying
> > to get Cocoon to read an user's session name variable (employeeData)
> created
> > by the login process.  Can Cocoon2 read the session information from
the
> > JB/TC "instance"? (sorry if that is not the right terminology)
> 
> (IIRC) Yes, if "login process" resides in the *same* webapp where
cocoon
> is deployed.
> 
> 
> > I can see where Cocoon can perform tasks using it's own "session"
> variables,
> 
> Cocoon's session is servlet session.
> 
> Vadim
> 
> > but I would like to use the ones created in Tomcat to get the
current
> user's
> > employee profile (i.e. "company_id", etc.) that was created when
they
> logged
> > in.
> >
> > This version of JBoss/Tomcat has Cocoon2 running as a cocoon.war
file from
> > the $JBOSS_HOME/deploy folder.
> >
> > If this is the wrong place to post this, I understand and will post
> > elsewhere, but I'm trying to understand how these all work together
and
> > since they are all used through the jboss/deploy folder, whether
they
> share
> > any common variables/memory/jvm data/etc.
> >
> > Thanks!
> > Mark
> >
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


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

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




RE: using C2 to read sessions from JBoss/Tomcat

2002-04-11 Thread Mark S. Kent

Vadim,

Using the JBoss-2.4.4_Tomcat-4.0.1 package starts Tomcat "within" the JBoss
instance (I think).  The "jboss/deploy" folder has:

+ cocoon.war (folder)
  -- (contains same contents as standard tomcat/webapps/cocoon folder)
+ lib (folder)
  -- jbosspool-jdbc.jar
  -- jms-ra.jar
+ web.war (folder)
  -- (contains all my JSP and webfiles [images/css/etc] )
cl.jar (file -- a jar with my ejbs)
deploy.txt (text file)

So, I would think that these two (cocoon.war and cl.jar) are deployed
"separately" within the JBoss context so that they would not "see" each
other's session variables.  Does that sound right to you?

If so, is there a way to start the cl.jar "within" the web.war "webapp" (or
vice versa) so that they can share session variables?

I'm trying to get a similar question answered as well on the JBoss forum,
and can take this discussion there if need be.  Thanks for your help!

Mark

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 2:49 PM
To: [EMAIL PROTECTED]; Mark Kent
Subject: RE: using C2 to read sessions from JBoss/Tomcat


> From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
>
> I'm testing the JBoss-2.4.4_Tomcat-4.0.1 package with Cocoon2 and I'm
trying
> to get Cocoon to read an user's session name variable (employeeData)
created
> by the login process.  Can Cocoon2 read the session information from the
> JB/TC "instance"? (sorry if that is not the right terminology)

(IIRC) Yes, if "login process" resides in the *same* webapp where cocoon
is deployed.


> I can see where Cocoon can perform tasks using it's own "session"
variables,

Cocoon's session is servlet session.

Vadim

> but I would like to use the ones created in Tomcat to get the current
user's
> employee profile (i.e. "company_id", etc.) that was created when they
logged
> in.
>
> This version of JBoss/Tomcat has Cocoon2 running as a cocoon.war file from
> the $JBOSS_HOME/deploy folder.
>
> If this is the wrong place to post this, I understand and will post
> elsewhere, but I'm trying to understand how these all work together and
> since they are all used through the jboss/deploy folder, whether they
share
> any common variables/memory/jvm data/etc.
>
> Thanks!
> Mark
>


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

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


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

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




RE: using C2 to read sessions from JBoss/Tomcat

2002-04-11 Thread Vadim Gritsenko

> From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
> 
> I'm testing the JBoss-2.4.4_Tomcat-4.0.1 package with Cocoon2 and I'm
trying
> to get Cocoon to read an user's session name variable (employeeData)
created
> by the login process.  Can Cocoon2 read the session information from
the
> JB/TC "instance"? (sorry if that is not the right terminology)

(IIRC) Yes, if "login process" resides in the *same* webapp where cocoon
is deployed.

 
> I can see where Cocoon can perform tasks using it's own "session"
variables,

Cocoon's session is servlet session.

Vadim

> but I would like to use the ones created in Tomcat to get the current
user's
> employee profile (i.e. "company_id", etc.) that was created when they
logged
> in.
> 
> This version of JBoss/Tomcat has Cocoon2 running as a cocoon.war file
from
> the $JBOSS_HOME/deploy folder.
> 
> If this is the wrong place to post this, I understand and will post
> elsewhere, but I'm trying to understand how these all work together
and
> since they are all used through the jboss/deploy folder, whether they
share
> any common variables/memory/jvm data/etc.
> 
> Thanks!
> Mark
> 


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

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




using C2 to read sessions from JBoss/Tomcat

2002-04-11 Thread Mark S. Kent

I'm testing the JBoss-2.4.4_Tomcat-4.0.1 package with Cocoon2 and I'm trying
to get Cocoon to read an user's session name variable (employeeData) created
by the login process.  Can Cocoon2 read the session information from the
JB/TC "instance"? (sorry if that is not the right terminology)

I can see where Cocoon can perform tasks using it's own "session" variables,
but I would like to use the ones created in Tomcat to get the current user's
employee profile (i.e. "company_id", etc.) that was created when they logged
in.

This version of JBoss/Tomcat has Cocoon2 running as a cocoon.war file from
the $JBOSS_HOME/deploy folder.

If this is the wrong place to post this, I understand and will post
elsewhere, but I'm trying to understand how these all work together and
since they are all used through the jboss/deploy folder, whether they share
any common variables/memory/jvm data/etc.

Thanks!
Mark


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

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




Re: Sessions and session ids

2002-04-08 Thread KOZLOV Roman

Hi James,

James Harris wrote:

> Hi
>
> I am trying to figure sessions out and the site docs seem contradictory.
> For example, does it matter whether I use the namespace xmlns:xsp-session or
> xmlns:session in my xsps as these are both given in examples.

No, it doesn't, if you declare that namespace which you use.

> Do I also
> need to use the namespace declaration in my xsl stylesheets?

Yes, you need, if you want to be able to refer to elements from this namespace
in your xsl templates.

>
> I have a static html 'login' page which just posts a username and password
> to an xsp.  I have some debugging code in the xsp to just display these
> which it duly does.  I also have a Session Id= in the
> xsp to print out the session id but this turns out blank on the web page.  I
> have an xmlns:xsp-session="http://apache.org/xsp/session/2.0"; and
> create-session="true" declaration in the name space of the xsp.  I also have
> a  at the point of entry
> to the website in the sitemap.
>
> There must be something I am missing as the session id does not seem to be
> preserved when I get to the xsp.

Try the following just for checking:


Roman.

> I can add to the session and retrieve from
> it in the xsp though.  Do I need to ditch the static login page and use an
> xsp instead with something like this from the cocoon examples:
> Follow me!
>
> Cheers in advance for any help.
> Jim
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


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

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




Sessions and session ids

2002-04-08 Thread James Harris

Hi

I am trying to figure sessions out and the site docs seem contradictory.
For example, does it matter whether I use the namespace xmlns:xsp-session or
xmlns:session in my xsps as these are both given in examples.  Do I also
need to use the namespace declaration in my xsl stylesheets?

I have a static html 'login' page which just posts a username and password
to an xsp.  I have some debugging code in the xsp to just display these
which it duly does.  I also have a Session Id= in the
xsp to print out the session id but this turns out blank on the web page.  I
have an xmlns:xsp-session="http://apache.org/xsp/session/2.0"; and
create-session="true" declaration in the name space of the xsp.  I also have
a  at the point of entry
to the website in the sitemap.

There must be something I am missing as the session id does not seem to be
preserved when I get to the xsp.  I can add to the session and retrieve from
it in the xsp though.  Do I need to ditch the static login page and use an
xsp instead with something like this from the cocoon examples:
Follow me!

Cheers in advance for any help.
Jim


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

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




Re: sessions and others in C2

2002-01-30 Thread Powys County Council Mail Delivery System

Your message was not delivered this time due to a system failure. Please resend it.
Apologies for any inconvenience this may have caused.

- Original Message -
From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 3:01 PM
Subject: RE: sessions and others in C2


> From: Bucholdt, Christian [mailto:[EMAIL PROTECTED]]
>
> Hi,
>
> I have reading, that XSP support Sessions (I'm using Cocoon 2).
> The JSP/Servlets-API is supporting more internal objects like
"application"
> and "page" with the ServletContext.

Can you provide a patch which will make these available?


> Can I use this internal objects in XSP? If 'yes' - how? If 'no' - is
there a
> other solution like ServletContext and web.xml?

Any generated from XSP Java source file have a comment:

  /* Built-in parameters available for use */
  // context- ServletContext
  // request- Request
  // response   - Response
  // parameters - parameters defined in the sitemap

You can obtain session from the request ATM.

Vadim


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

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






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

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




RE: sessions and others in C2

2002-01-30 Thread Vadim Gritsenko

> From: Bucholdt, Christian [mailto:[EMAIL PROTECTED]]
> 
> Hi,
> 
> I have reading, that XSP support Sessions (I'm using Cocoon 2).
> The JSP/Servlets-API is supporting more internal objects like
"application"
> and "page" with the ServletContext.

Can you provide a patch which will make these available?


> Can I use this internal objects in XSP? If 'yes' - how? If 'no' - is
there a
> other solution like ServletContext and web.xml?

Any generated from XSP Java source file have a comment:

  /* Built-in parameters available for use */
  // context- ServletContext
  // request- Request
  // response   - Response
  // parameters - parameters defined in the sitemap

You can obtain session from the request ATM.

Vadim


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

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




sessions and others in C2

2002-01-30 Thread Bucholdt, Christian

Hi,

I have reading, that XSP support Sessions (I'm using Cocoon 2).
The JSP/Servlets-API is supporting more internal objects like "application"
and "page" with the ServletContext. 
Can I use this internal objects in XSP? If 'yes' - how? If 'no' - is there a
other solution like ServletContext and web.xml?

gruss
christian bucholdt

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

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




Re: Counting Sessions

2002-01-26 Thread Bernhard Huber

hi,
i think your problem is not cocoon releated.
first let me ask you are you talking about http-session?

In that case you should read the servlet-2.2, or servlet-2.3 spec.
You may want to use a ServletContext attribute holding the current 
session-count.
Lets say:

  Integer total_count = 
(Integer)servlet_context.getAttribute("total-session-count");
  Integer new_total_count = ...;
  servlet_context.setAttribute("total-session-count", new_total_count);
http://xml.apache.org/cocoon/faqs.html>

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




Counting Sessions

2002-01-24 Thread Charles Butcher

I need to be able to keep track of the number of active cocoon sessions, and
prevent additional users logging on to our application once a certain number
of sessions are active.

Being new to cocoon, I'm having a hard time working out a good way to do
this.

Can anyone give me some suggestions?

Thanks,
Charles


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

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




Sessions: JSP/XSL

2001-09-17 Thread Mark S. Kent



I'm 
creating session object called "employee" during login time by a JSP page (using 
a bean).  I would like to be able read the "employee" session information 
to validate a user in XSP (within my XML file) like this:
 

    xmlns:xsp="http://www.apache.org/1999/XSP/Core"    
xmlns:session="http://www.apache.org/1999/XSP/Session"    
create-session="true">
    
name.modulename.EmployeeData
 

        EmployeeData employeeData = 
null;    employeeData = 
(EmployeeData);
    if( employeeData != null ) 
System.out.println( "Data ID: " + employeeData.getEmployee_id() 
);    else System.out.println( "Data 
ID: none" );
    

 
This 
line:
employeeData = (EmployeeData);never finds the session variable called 
"employee" (remember it was created by a JSP page calling a bean) so the only 
value I receive is "null". 
How 
can I read this session value in XSP/XML?
 
Thanks!
Mark



Problem with sessions on Cocoon 2

2001-09-07 Thread David Hénot

Hello,
I'm trying to use Cocoon 2 with SessionValidatorAction and 
DatabaseAuthenticatorAction to handle user authentication, but I'm unable to 
get the session validator to see the session variables set by the database 
authenticator. Searching mail and groups archives didn't help much ...

Versions : Cocoon 2.0b1, Tomcat 3.2.3, Apache 1.3.19 (with mod_jk)

--- in sitemap.xmap ---
   

   

   

 
 




   

   

 
 
 
  
  
 

   


When I try to log in ("do-login"), I get this in the log file :

   DBAUTH: authorized successfully
   DBAUTH: session created
   DBAUTH: propagating param login=henot
   DBAUTH: propagating param name=Hénot David
   Action ((Action)this.actions.select( db-authenticator )).act
   Sitemap: session='true', redirecting to ''
   redirect: entering session mode
   redirect: session mode completed, id = lsbkkpjd81
   Sending redirect to ';jsessionid=lsbkkpjd81'

So everything seems OK but later when the session validator is called :

   SESSIONVALIDATOR: validating parameters from given constraint-set 
is-logged-in
   SESSIONVALIDATOR: given set is-logged-in contains 2 rules
   VALIDATOR: validating parameter: login
   VALIDATOR: validating string parameter login (encoded in a string: false)
   VALIDATOR: validating parameter: name
   VALIDATOR: validating string parameter name (encoded in a string: false)
   SESSIONVALIDATOR: all session params validated

It looks like the validator didn't see anything in the session, and in fact I 
can't use the name variable from the xsl stylesheet (always undefined 
although I put a "" after the xsl:stylesheet)

Any help *much* appreciated !

-- 
David Hénot

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

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




[C2] Sessions

2001-07-05 Thread Forge


Hi there,

I've upgraded to cocoon 2.0b1 and now the sessions don't work.

request.getSession() and request.getSession(true)
both don't create a session, as is specified in the API.

I've seen the piece on session management, but I don't think
that that's the only way to maintain sessions (I think
its very ugly to have to create your links and append
the session id behind it).

Since tomcat automatically maintains sessions as is stated in
that same document, can I access that session object?

Or am I doing something completely wrong?

Greetings,

Kenney Westerhof


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

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




Re: sessions and sitemap

2001-06-28 Thread Christian Haul

On 27.Jun.2001 -- 07:50 PM, java guru wrote:
> Hi.,
>   I dont quite remember if someone has already posted
> this..
> 
> But i wanted all my stylesheets to use some parameters
> specific to user(from session) like page colors etc..
> 
> I am of the impression that the stylesheet cannot
> access the user session..so it need to get the info
> from sitemap... But how sitemap could get the info
> from session and pass it onto style sheet ?..
> 
> Your help is appreciated...

use an action that extracts the data from session to a map and use the
value as parameters to your stylesheets or to switch between different
stylesheets.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

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




sessions and sitemap

2001-06-27 Thread java guru

Hi.,
  I dont quite remember if someone has already posted
this..

But i wanted all my stylesheets to use some parameters
specific to user(from session) like page colors etc..

I am of the impression that the stylesheet cannot
access the user session..so it need to get the info
from sitemap... But how sitemap could get the info
from session and pass it onto style sheet ?..

Your help is appreciated...


Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

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

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




How to use sessions in Cocoon2

2001-06-26 Thread Anthony Mills



Hello,
    How does one do 
this:
 

    SomeClass sc = 
(SomeClass)session.getAttribute( "sc" );
 
    session.setAttribute( "sc", 
sc );

 
The session logicsheet does not seem to work if you 
use anything but strings.  For now I am having to embed the correct code 
into my XSP page.  And the Documents on Cocoon2 web site are for Cocoon1, 
so they are little help.
 
Thanks,
 
Anthony
 


RE: Cocoon and Sessions

2001-06-06 Thread Ramesh Vejendla

Hi Declan
if possible can u plz send me those XSL pages also
it will very helpful to me. 
thanks
rammi

-Original Message-
From: declan kelly [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 8:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Cocoon and Sessions 


I bet your error is caused by not including the create
session directive in the namespaces declaration.

Anyway here's a very simple little login thingy, it
takes stuff from a form and logs you in or redirects
you back.







http://apache.org/cocoon/SQL/v2";
xmlns:xsp="http://www.apache.org/1999/XSP/Core";
xmlns:session="http://www.apache.org/1999/XSP/Session";
create-session="true">

String sqlstring = "";
String username ="";
String passwd = "";
String UID="";
final static char APOS = (char)39;
final static char BLANK = (char)32; 


 
username = request.getParameter("username");
passwd= request.getParameter("passwd");

(username.replace(APOS,BLANK)).trim();
(passwd.replace(APOS,BLANK)).trim();


username.toLowerCase();
passwd.toLowerCase();

sqlstring = "SELECT * FROM users WHERE user_name =
'" + username + "'";


project


sqlstring




if(passwd.equals())
{









response.sendRedirect(response.encodeRedirectURL("menupage.xml"));
}
else

response.sendRedirect("login.xml?error=1"); 





response.sendRedirect("login.xml?error=1");



Try Again




Then on every page which you should be logged in to
see include this 




try{;}
catch (NullPointerException e)
   {
response.sendRedirect("login.xml");
   }





--- Truhann van der Poel
<[EMAIL PROTECTED]> wrote:
> I am new to Cocoon and sessions. Are using C1.8.2.
> 
> Can anybody send a beginner sample (or pointer to
> help-documentation) to
> setup/save/retrieve variables from a session.  
> All the  tags in my xsp page create
> NullPointer's.
> 
> Truhann
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
***Confidential Notice

This e-mail communication may contain information that is
confidential and privileged. The information is intended
to be for the use of the addressee only. If you are not the
named addressee you should not disseminate, distribute or
copy this e-mail: to do so could be a breach of confidence.

Kshema Technologies Ltd.,
# 33/1, Lalbagh Road, Bangalore 560027, INDIA. 
Tel: (91) 80- 2995114/5/6
Fax: (91) 80 2272933 

**

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

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




Re: Cocoon and Sessions

2001-06-06 Thread declan kelly

I bet your error is caused by not including the create
session directive in the namespaces declaration.

Anyway here's a very simple little login thingy, it
takes stuff from a form and logs you in or redirects
you back.







http://apache.org/cocoon/SQL/v2";
xmlns:xsp="http://www.apache.org/1999/XSP/Core";
xmlns:session="http://www.apache.org/1999/XSP/Session";
create-session="true">

String sqlstring = "";
String username ="";
String passwd = "";
String UID="";
final static char APOS = (char)39;
final static char BLANK = (char)32; 


 
username = request.getParameter("username");
passwd= request.getParameter("passwd");

(username.replace(APOS,BLANK)).trim();
(passwd.replace(APOS,BLANK)).trim();


username.toLowerCase();
passwd.toLowerCase();

sqlstring = "SELECT * FROM users WHERE user_name =
'" + username + "'";


project


sqlstring




if(passwd.equals())
{






response.sendRedirect(response.encodeRedirectURL("menupage.xml"));
}
else

response.sendRedirect("login.xml?error=1"); 





response.sendRedirect("login.xml?error=1");



Try Again




Then on every page which you should be logged in to
see include this 




try{;}
catch (NullPointerException e)
   {
response.sendRedirect("login.xml");
   }





--- Truhann van der Poel
<[EMAIL PROTECTED]> wrote:
> I am new to Cocoon and sessions. Are using C1.8.2.
> 
> Can anybody send a beginner sample (or pointer to
> help-documentation) to
> setup/save/retrieve variables from a session.  
> All the  tags in my xsp page create
> NullPointer's.
> 
> Truhann
> 
>
-
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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

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




Re: Cocoon and Sessions

2001-06-06 Thread paint007


Truhann,

you are probably doing everything right, but there is one small thing that
the documentation doesn't cover very well.  You need to set the
create-session attribute to true in your  element, like this:
http://www.apache.org/1999/XSP/Core";
  create-session="true"
>

Otherwise the session isn't created/retrieved and you get the exceptions as you 
describe.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Cocoon and Sessions


I am new to Cocoon and sessions. Are using C1.8.2.

Can anybody send a beginner sample (or pointer to help-documentation) to
setup/save/retrieve variables from a session.
All the  tags in my xsp page create NullPointer's.

Truhann







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

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




Cocoon and Sessions

2001-06-06 Thread Truhann van der Poel

I am new to Cocoon and sessions. Are using C1.8.2.

Can anybody send a beginner sample (or pointer to help-documentation) to
setup/save/retrieve variables from a session.  
All the  tags in my xsp page create NullPointer's.

Truhann

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

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