You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Schirmacher <nn...@yahoo.de> on 2005/03/20 12:47:00 UTC
xsp:logic block does not compile
This simple xsp file compiles only if the <xsp:logic>
block is nested within another tag. If I remove the
<xyz> tags then I get a NullPointerException. This
seems to be caused by the <xsp-request:get-parameter>
tag, because if I delete those lines then the code
works, with or without the <xyz> tag.
I do not understand why the
<xsp-request:get-parameter> must be nested within
another tag. Is this a cocoon bug?
I am using cocoon 2.1.6, tomcat 5.0.28, java
1.4.2_05-b04.
Here's the code:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<xyz>
<xsp:logic>
boolean delete = (<xsp-request:get-parameter
name="DeleteButton"/> != null);
</xsp:logic>
</xyz>
</xsp:page>
And here's the exception log:
org.apache.cocoon.ProcessingException: Language
Exception:
org.apache.cocoon.components.language.LanguageException:
Error while instantiating
org/apache/cocoon/www/tt/xsp/class_/list_xsp:
java.lang.NullPointerException
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loadProgram(ProgramGeneratorImpl.java:409)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:311)
at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:170)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:370)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:609)
...
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp:logic block does not compile
Posted by "John L. Webber" <Jo...@jentro.com>.
AFAIK this is not a bug - the <xsp:page> tag is replaced during
processing, but the generated document needs to have a root element,
which you need to supply.
John
Schirmacher wrote:
> This simple xsp file compiles only if the <xsp:logic>
> block is nested within another tag. If I remove the
> <xyz> tags then I get a NullPointerException. This
> seems to be caused by the <xsp-request:get-parameter>
> tag, because if I delete those lines then the code
> works, with or without the <xyz> tag.
>
> I do not understand why the
> <xsp-request:get-parameter> must be nested within
> another tag. Is this a cocoon bug?
>
> I am using cocoon 2.1.6, tomcat 5.0.28, java
> 1.4.2_05-b04.
>
> Here's the code:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> <xyz>
> <xsp:logic>
> boolean delete = (<xsp-request:get-parameter
> name="DeleteButton"/> != null);
> </xsp:logic>
> </xyz>
> </xsp:page>
>
--
---------------------------------------------------------
Jentro Technologies GmbH
John L. Webber, Software Development
---------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org