cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yann petit" <ype...@capgemini.fr>
Subject [xsp] generate a xml request file ...
Date Fri, 05 Jan 2001 11:43:40 GMT
hi,

I would like to use xsp to generate a xml flow depending of the arguments passed to the xml
file ...
That's ok, it works fine....

But now I'd like to make a request to my database depending on the flow I just generate ....

I do something like :

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-format type="text/xml"?>
<?xml-logicsheet href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
<xsp:page language="java" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:request="http://www.apache.org/1999/XSP/Request">
  <xsp:logic>
    <root>
      <page>
Enumeration enum = request.getParameterNames();
while (enum.hasMoreElements()) {
String parameterName = (String) enum.nextElement();
String[] parameterValues = request.getParameterValues(parameterName);
  for (int i = 0; i &lt; parameterValues.length; i++) {
<result><query><esql:execute-query><esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver><esql:dburl>jdbc:odbc:tsd</esql:dburl><esql:query>SELECT
Task_LIB FROM TASKS WHERE Task_ID = '<xsp:expr>parameterValues[i]</xsp:expr>'</esql:query><esql:results><result><Task_LIB><esql:get-string
column="Task_LIB"/></Task_LIB></result></esql:results></esql:execute-query></query></result>
  }
}
      </page>
    </root>
  </xsp:logic>
</xsp:page>

************************************************************************************************************************
And then I get an error ... see below...

************************************************************************************************************************

java.lang.Exception: XSP Java Compiler: Compilation failed for _nTasksForYohann_testsYann2.java
 178: Identifier expected.
 
     xspParentNode = xspCurrentNode;
 
                  ^
 
 1 error
 
 
 
  at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java,
Compiled Code)
  at java.lang.Exception.(Exception.java, Compiled Code)
  at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.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:865)
  at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
  at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
  at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
Compiled Code)
  at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code)
  at java.lang.Thread.run(Thread.java, Compiled Code)

************************************************************************************************************************


any ideas ?


thanx

yann

Mime
View raw message