cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: I got an error
Date Fri, 26 Mar 2004 17:39:54 GMT


> Subject: I got an error
> 
> En error rise up when compling this:
> String user = <xsp-request:get-parameter name="user"/>;
> 		<xsp-session:set-attribute name="user">
> 			<xsp:expr>user</xsp:expr>
> 		</xsp-session:set-attribute >
> 
> The error is:
> org.apache.cocoon.components.language.LanguageException: 
> Error compiling
> login_xsp:
> ERROR 1 (org/apache/cocoon/www/Nautilus/xsp/login_xsp.java):
> ...
> 			msg = "Utente "+user+" autenticato - 
> pu\u00F2 procedere alla pagina di configurazione" ;
> 
> 
>       session.setAttribute(String.valueOf("user"),
> 
> // start error (lines 140-140) "String literal is not 
> properly closed by a double-quote"
>           "
> 
> // end error
> 			user
> 		");
> 
> It seems to me syntax is ok! Where I'm wrong?

Seems like the string literal "user" has been split up
over several lines. So, you have the opening quotes
on one line, and the closing on another. In Java, that's
a no-no.

Try:

String user = <xsp-request:get-parameter name="user"/>;

<xsp-session:set-attribute
name="user"><xsp:expr>user</xsp:expr></xsp-session:set-attribute>

I.e. put the set-attribute tags all on one line.

/LS


Mime
View raw message