cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bonnin" <s...@libero.it>
Subject xsp:expr & esql
Date Tue, 24 Jul 2001 07:20:28 GMT
Hi,
I want to use an xsp:expr tag within an esql:query tag but my solution
doesn't work. This is the "skeleton" of my code:

<page>
<xsp:logic>
        HttpSession ses = request.getSession(false);
        InfoUser userInfo = (InfoUser) ses.getValue("Informations");
        String id = (String) userInfo.getUserId(); <!-- Here is all OK -->
</xsp:logic>

  <esql:execute-query>

    <esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
    <esql:dburl>jdbc:odbc:Users</esql:dburl>

<esql:query>
 update users set country = '
  <xsp:expr>request.getParameter("country")</xsp:expr>' where user =
'<xsp:expr>id</xsp:expr>' and password = 'd'
</esql:query>
</esql:execute-query>
....
....
....

the java compiler return me the following error:

java.lang.Exception: XSP Java Compiler: Compilation failed for
_compute_position.java
113: Undefined variable or class name: userInfo

      + userInfo.getUserId()

        ^

Note:
C:\foo\Tomcat\repository\_C_\_foo\_Tomcat\_webapps\_Cocoon\_samples\_Smit\_c
ompute_position.java uses or overrides a deprecated API.  Recompile with
"-deprecation" for details.

1 error, 1 warning



 at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJa
vaProcessor.java, Compiled Code)
 at java.lang.Exception.(Exception.java, Compiled Code)
 at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJa
vaProcessor.java, Compiled Code)
 at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java,
Compiled Code)
 at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
 at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
 at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java,
Compiled Code)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java,
Compiled Code)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java, Compiled Code)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java, Compiled Code)


Why? Is this a "scope" problem? (I think)
How can I do?

Thanks.



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


Mime
View raw message