Thank you christopher,
I didn't know that the line refers to the generated java code upon XSP
compilation. I have compiled the generated code and it has helped me to fix
some java syntax error. At the end I was getting one error which is
identifier error. The identifier error persists because I happen to put my
document root inside the <xsp:logic> tag. But it was impossible for cocoon
to clearly point where the error is situated. I had to keep guessing!!
It will help if cocoon way of pointing error could be enhanced.
Bobo
----- Original Message -----
From: "Christopher Painter-Wakefield" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 8:37 PM
Subject: Re: XSP: Type and Identifier errors
>
> Bobo,
>
> the line numbers actually refer to the generated Java code, which is in a
> repository directory as defined by your cocoon.properties file. I think
> your first error here is missing semicolons on the lines
> String fname = request.getParameter("fname")
> ...//some more request.getParameter()
> String email = request.getParameter("email")
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> cc:
>
> Subject: XSP: Type and Identifier errors
>
>
> Hello,
> I am receiving this error:
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _newUser.java
> 72: Type expected.
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> ^
> 240: Identifier expected.
> xspParentNode = xspCurrentNode;
> ----- ^
> The ligne 72: points to isIDduplicate()
> function while the line 240 points to if-else.
> I am using cocoon 1.8.2 and Tomcat3.2.1
>
> Here is my code (this program is for form handling):
>
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="../../userFactory.xsl" type="text/xsl"?>
> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> <xsp:structure>
> <xsp:include> java.lang.*</xsp:include>
> <xsp:include> java.sql.*</xsp:include>
> <xsp:include>java.sql.Date</xsp:include>
> <xsp:include> java.sql.DriverManager</xsp:include>
> <xsp:include> java.sql.SQLException</xsp:include>
> <xsp:include>java.sql.Connection</xsp:include>
> <xsp:include>java.sql.ResultSet</xsp:include>
> <xsp:include>java.sql.Statement</xsp:include>
> </xsp:structure>
> <xsp:logic>
> String fname = request.getParameter("fname")
> ...//some more request.getParameter()
> String email = request.getParameter("email")
>
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> String serverName =request.getServerName();
> String
> URL="jdbc:mysql://"+serverName+"/ILSDB?user=Bobo&password=BoboPassword";
> Connection con = DriverManager.getConnection(URL, "", "" );
> Statement stmt1=
>
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATAB
>
> LE);
> Statement stmt2=
>
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATAB
>
> LE);
>
>
> <snip>
>
> ---------------------
> I need your help.
> Thank you.
> Bobo,
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>