You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Laurent Trillaud <lt...@jouve.fr> on 2003/11/05 16:08:29 UTC

RE : [xsp-session-fw] language Exception

> Why don't you just do:
> 
> <xsp:logic>
>   String str =  <xsp-session-fw:getxml as="string"
> context="authentication" path="/authentication/ID"/>;
> </xsp:logic>

Yes it's easier, but it's the same problem.
> You may need to catch an exception, I don't have the xsp-session-fw
API
> handy.

Here is the new XSP
<xsp:logic>
try {
String str = <xsp-session-fw:getxml as="string" context="authentication"
path="/authentication/ID"/>;
} catch( Exception e) {}
</xsp:logic>

Now I got a syntax error on the try.
If I look about the java code generated, I can see that I'm not inside a
function!

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):
...
        // resolver   - org.apache.cocoon.environment.SourceResolver

        /* User Class Declarations */
        

// start error (lines 74-74) "Syntax error on keyword "try"; "boolean",
"void", "byte", "short", "int", "long", "char", "float", "double",
"Identifier", "interface", "class" expected"
	try {

// end error
		String str = 
        
        (((DocumentFragment)(XSPSessionFwHelper.getXML(this.manager,
                String.valueOf("authentication"),

...


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