You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Newland <ch...@emorphia.com> on 2001/08/21 13:20:29 UTC

C2: Create session conditionally in XSP page?

Hi All,

Is there a way to conditionally create a session object in C2?

I have a page that authenticates a user and I don't want to use
create-session="true" in the xsp:page element since this will also create a
session for a user whose authentication failed (I think).

Is there a way to create the session programatically (I can't see it in the
logicsheet but maybe using raw Java) ?

Thanks for your help,

Best Regards,

Chris

--
Chris Newland
Software Research Engineer

Emorphia Ltd
Registered in England.  4133002
Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK

Email: chris.newland@emorphia.com
Tel: +44 (0)1279 450100
Fax: +44 (0)1279 450102

Check out FIPA-OS at http://fipa-os.sourceforge.net/

This message may contain information proprietary to Emorphia so any
unauthorised disclosure, copying or distribution of its contents is strictly
prohibited.



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Create session conditionally in XSP page?

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> Hi All,
>
> Is there a way to conditionally create a session object in C2?
>
> I have a page that authenticates a user and I don't want to use
> create-session="true" in the xsp:page element since this will also create
a
> session for a user whose authentication failed (I think).
>
> Is there a way to create the session programatically (I can't see it in
the
> logicsheet but maybe using raw Java) ?

Of course you can create it in raw Java.
isLogged = isUserAuthenticated();
request.getSession(isLogged);

See Servlet specification for details.

>
> Thanks for your help,
>
> Best Regards,
>
> Chris
>
> --
> Chris Newland
> Software Research Engineer
>
> Emorphia Ltd
> Registered in England.  4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
>
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
>
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
>
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents is
strictly
> prohibited.
>
>
>
> ---------------------------------------------------------------------
> 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: <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/faqs.html>

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


RE: C2: Create session conditionally in XSP page?

Posted by Vadim Gritsenko <vg...@hns.com>.
I beleive this would create session:
		<xsp:logic>
			String id = <session:get-id/>;
		</xsp:logic>

Another approach is to move authentication code into action, then your XSP could have
create-session="true". Or even move the whole part into action, including session creation.

Vadim

> -----Original Message-----
> From: Chris Newland [mailto:chris.newland@emorphia.com]
> Sent: Tuesday, August 21, 2001 7:20 AM
> To: Cocoon-Users
> Subject: C2: Create session conditionally in XSP page?
> 
> 
> Hi All,
> 
> Is there a way to conditionally create a session object in C2?
> 
> I have a page that authenticates a user and I don't want to use
> create-session="true" in the xsp:page element since this will also create a
> session for a user whose authentication failed (I think).
> 
> Is there a way to create the session programatically (I can't see it in the
> logicsheet but maybe using raw Java) ?
> 
> Thanks for your help,
> 
> Best Regards,
> 
> Chris
> 
> --
> Chris Newland
> Software Research Engineer
> 
> Emorphia Ltd
> Registered in England.  4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
> 
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
> 
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
> 
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents is strictly
> prohibited.
> 
> 
> 
> ---------------------------------------------------------------------
> 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: <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/faqs.html>

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