cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paint...@mc.duke.edu
Subject Re: ESQL, sessions, and debugging
Date Thu, 17 May 2001 17:43:45 GMT

Jason,

what version of everything are you using?  I am using the
<request:get-parameter ...> mechanism inside <esql:parameter> tags very
successfully with Cocoon 1.8.2.  Also, are you sure you have the correct
URI's for the session and request taglibs?  I have this for the request
taglib (very different from yours, below):
     xmlns:request="http://www.apache.org/1999/XSP/Request"

-Christopher




Please respond to cocoon-users@xml.apache.org

To:   cocoon-users@xml.apache.org
cc:

Subject:  ESQL, sessions, and debugging


Hello all,

I've been trying to get an XSP page working that is using session
information to construct an ESQL query.  Things aren't going so
well as right now the XSP page won't even compile.

The offending command seems to be in the where clause...

uw_userid = <esql:parameter type="string"><session:get-attribute
name="uwid" default="jafoster" as="string"/></esql:parameter>

The error is:

Missing term.
          _esql_query.prepared_statement.setString(1,);


If I don't do the 'as="string"', then I get the following:

Incompatible type for method. Explicit cast needed to convert
java.lang.Object to java.lang.String.
              (XSPRequestHelper.getSessionAttribute(

"OK", says I, how about using a request parameter instead?

uw_userid = <esql:parameter type="string"><request:get-parameter
name="uwid"/></esql:parameter>

Things still don't compile.  Now I get...

')' expected.
                                   "uwid");

Looking at the generated Java I now get:

  _esql_query.prepared_statement.setString(1,
              xspAttr.addAttribute("", "name", "name", "CDATA",
                                   "uwid");


this.contentHandler.startElement("http://apache.org/xsp/request",
                                               "get-parameter",
"request:get-parameter",
                                               xspAttr);
              xspAttr.clear();



this.contentHandler.endElement("http://apache.org/xsp/request",
                                             "get-parameter",
"request:get-parameter");
                                                  );

I'm really stumped.  I'm also having a devil of a time trying to figure
out exactly what sql string is being sent to the database.  If it possible
to figure this out?

Thanks for any help.  I'm at the end of my skills.

Jason Foster





---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message