You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tom Place <ps...@nottingham.ac.uk> on 2002/11/10 13:04:45 UTC
Session Woes
Hi all,
Apologies for the relatively low level of this email but someone out
there must be able to answer in 1 min what I have been failing to do for
days now.
This simple XSP file:
<?xml version="1.0"?>
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-session="http://apache.org/xsp/session/2.0"
create-session="true">
<page>
<xsp-session:set-attribute
name="fruit">Apple</xsp-session:set-attribute>
<fruit><xsp-session:get-attribute name="fruit"/></fruit>
</page>
</xsp:page>
Should produce the following XML right?
<page>
<fruit>Apple</fruit>
</page>
What am I doing wrong if the session attributes are being ignored and I
get the following XML
<page>
<xsp-session:set-attribute
name="fruit">Apple</xsp-session:set-attribute>
<fruit><xsp-session:get-attribute name="fruit"/></fruit>
</page>
Again my apologies if I have missed the obvious but this example if off
the cocoon site and should work?!
Thanks
Tom
---------------------------------------------------------------------
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: Session Woes
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Tom Place wrote:
>Hi all,
>
>Apologies for the relatively low level of this email but someone out
>there must be able to answer in 1 min what I have been failing to do for
>days now.
>
>This simple XSP file:
>
><?xml version="1.0"?>
><xsp:page
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> create-session="true">
>
> <page>
> <xsp-session:set-attribute
>name="fruit">Apple</xsp-session:set-attribute>
> <fruit><xsp-session:get-attribute name="fruit"/></fruit>
> </page>
>
></xsp:page>
>
>Should produce the following XML right?
>
><page>
> <fruit>Apple</fruit>
></page>
>
>What am I doing wrong if the session attributes are being ignored and I
>get the following XML
>
> <page>
> <xsp-session:set-attribute
>name="fruit">Apple</xsp-session:set-attribute>
> <fruit><xsp-session:get-attribute name="fruit"/></fruit>
> </page>
>
>Again my apologies if I have missed the obvious but this example if off
>the cocoon site and should work?!
>
>
There are two cases that can cause XSP taglib markup to be ignored by
the XSP engine and produced "as is" in the output document : either the
taglib namespace is wrong (this isn't the case here), or the the taglib
isn't declared in cocoon.xconf.
You should check that the following exists in your cocoon.xconf :
<markup-languages>
<xsp-language name="xsp" logger="core.markup.xsp">
...
<target-language name="java">
<builtin-logicsheet>
<parameter name="prefix" value="xsp-session"/>
<parameter name="uri" value="http://apache.org/xsp/session/2.0"/>
<parameter name="href"
value="resource://org/apache/cocoon/components/language/markup/xsp/java/session.xsl"/>
</builtin-logicsheet>
Hope this helps.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
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>