No, the way he is using <xsp:expr> here is just fine.
-Christopher
|---------+---------------------------->
| | Leon Widdershoven|
| | <[EMAIL PROTECTED]> |
| | |
| | 04/15/2004 02:14 |
| | PM |
| | Please respond to|
| | users |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: Re: ESQl and Stored Procedures
|
>--------------------------------------------------------------------------------------------------------------|
Could it be that the <xsp:expr> embedded in the <xsp:logic> block is the
culprit? I read somwhere that that is not a wise combination. (which is
logical as in an xsp:logic you don't need an xsp:expr).
Please note: I did not try this, and have never used the esql:call. But
it seems
that all tags are closed - so this might just be it.
You could in stead prepare all your calls in advance in a logic block
and call on
those strings when needed - outside of the logic block with <xsp:expr>.
Just my 0.02c (and that's not much).
Leon
arlos Dias wrote:
> Hi,
> I'm trying to use a stored procedure for making an update in an Oracle
> database.
> Here is the xsp+esql code:
> <?xml version="1.0" encoding="iso-8859-1"?>
>
> <xsp:page
> language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
>
> <xsp:structure>
> <xsp:include>java.lang.String</xsp:include>
> </xsp:structure>
>
> <update>
> <esql:connection>
> <esql:pool>sca</esql:pool>
> <xsp:logic>
>
> String app_id = request.getParameter("app_id");
> String user_id = request.getParameter("user_id");
> if (app_id != null || user_id != null) {
>
> <esql:call>
> {call bookmark.update_bookmark_list(<esql:parameter
> direction="in" type="String">\
> <xsp:expr>user_id</xsp:expr></esql:parameter>,\
> <esql:parameter direction="in" type="String">\
> <xsp:expr>app_id</xsp:expr></esql:parameter>)}
> </esql:call>
> <esql:call-results>
> <esql:update-results>
> <number-of-rows><esql:get-update-count/></number-of-rows>
> </esql:update-results>
> </esql:call-results>
> }
> else {
> <exception>Parameters does not exists</exception>
> }
>
> </xsp:logic>
> </esql:connection>
> </update>
> </xsp:page>
>
> I got the following result (in the web page):
>
> XML document must have a top level element. Error processing resource
> 'http://rasputin:9090/adslV3/cubenavigator/update_bookmark'.
>
>
> In the error.log:
> [core.program-generator] (/adslV3/cubenavigator/update_bookmark)
> http9090-Processor7/ProgramGeneratorImpl: The serverpage
>
[file:/home/cdias/altaia/tomcat/webapps/adslV3/cubenavigator/generators/dynamic/xsp/update_bookmark_list.xsp]
> could not be preloaded, will be re-created
> (org.apache.cocoon.components.language.LanguageException: Unable to
> preload program
>
org/apache/cocoon/www/cubenavigator/generators/dynamic/xsp/update_bookmark_list_xsp:
> org.apache.cocoon.components.language.LanguageException: Could not
> load class for program
>
'org/apache/cocoon/www/cubenavigator/generators/dynamic/xsp/update_bookmark_list_xsp'
> due to a java.lang.ClassNotFoundException:
>
org.apache.cocoon.www.cubenavigator.generators.dynamic.xsp.update_bookmark_list_xsp)
>
> Can anybody tell me what's going on?!
>
> Thanks in advance,
> Carlos Dias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]