cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Trillaud" <ltrill...@jouve.fr>
Subject RE : [xsp-session-fw] language Exception
Date Wed, 05 Nov 2003 15:19:09 GMT
Ok, you're right.
This XSP is working
<page>
<xsp:logic>
String str = "Undefined";
try {
str = <xsp-session-fw:getxml as="string" context="authentication"
path="/authentication/I"/>;
} catch( java.lang.Exception e) {}
</xsp:logic>
<xsp:expr>str</xsp:expr>
</page>
</xsp:page>

Thanks a lot.
Laurent Trillaud

> -----Message d'origine-----
> De : Chris Morgan [mailto:chris@atomicdog.com]
> Envoyé : mercredi 5 novembre 2003 15:23
> À : users@cocoon.apache.org
> Objet : RE: [xsp-session-fw] language Exception
> 
> I've run into similar problems with the authentication session.  I
think
> that the problem is that your <xsp:logic> tag precedes the
<xsp:content>
> tag.  Don't know for sure, but I think the session (and therefore, the
> authentication) isn't available outside of the <xsp:content> tag.
> 
> 
> 
> -----Original Message-----
> From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
> Sent: Wednesday, November 05, 2003 9:17 AM
> To: users@cocoon.apache.org
> Subject: [xsp-session-fw] language Exception
> 
> 
> Hi
> I'm trying to get information inside the authentication session
context
> and give it into a java variable, to process it later, in a XSP file.
> 
> <?xml version="1.0"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-session-fw="http://apache.org/xsp/session-fw/1.0"
> create-session="true">
> <xsp:logic>
> String str = new String( <xsp-session-fw:getxml as="string"
> context="authentication" path="/authentication/ID"/>);
> </xsp:logic>
> <page>
> <xsp:expr>str</xsp:expr>
> </page>
> </xsp:page>
> 
> But this page produces this language exception.
> How can I do?
> 
> Original Exception:
> org.apache.cocoon.components.language.LanguageException: Error
compiling
> session_control_xsp:
> ERROR 1
>
(org/apache/cocoon/www/portal/session_control/resources/session_control_
> xsp.java):
> ...
>         /* User Class Declarations */
> 
> 		String str = new String(
> 
> 
> // start error (lines 76-76) "Default constructor cannot handle
> exception type ProcessingException thrown by implicit super
constructor.
> Must define an explicit constructor"
>         (((DocumentFragment)(XSPSessionFwHelper.getXML(this.manager,
> 
> // end error
>                 String.valueOf("authentication"),
> 
>
String.valueOf("/authentication/ID")))).getFirstChild().getNodeValue())
>       );
> 
> 
> ...
> Line 76, column 0: Default constructor cannot handle exception type
> ProcessingException thrown by implicit super constructor. Must define
an
> explicit constructor
> 	at
>
org.apache.cocoon.components.language.programming.java.JavaLanguage.comp
> ile(JavaLanguage.java:236)
> 	at
>
org.apache.cocoon.components.language.programming.CompiledProgrammingLan
> guage.load(CompiledProgrammingLanguage.java:208)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message