cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning von Bargen <H.vonBar...@Triestram-Partner.de>
Subject SQL taglib
Date Wed, 05 Apr 2000 08:21:49 GMT
Hi,
I still have trouble using the SQL taglib.
The following example seems to be not processed the way I expected.

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="dbpage-html.xsl" type="text/xsl"?>

<xsp:page
  language="java"
  xmlns:sql="http://www.apache.org/1999/SQL"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

  <page>
  <title>SQL Ergebnisse</title>
  <author>
    <name>Henning von Bargen</name>
	<address>h.vonbargen@triestram-partner.de</address>
  </author>

  	<sql:execute-query>
	   <sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
	   <sql:dburl>jdbc:oracle:thin:@dbserver:1521:orcl</sql:dburl>
	   <sql:username>scott</sql:username>
	   <sql:password>tiger</sql:password>
		<sql:doc-element>departments</sql:doc-element>
		<sql:row-element>dept</sql:row-element>
		<sql:tag-case>lower</sql:tag-case>
		<sql:null-indicator>yes</sql:null-indicator>
		<sql:id-attribute>id</sql:id-attribute>
		<sql:id-attribute-column>DEPTNO</sql:id-attribute-column>
		<sql:error-element>sqlerror</sql:error-element>
	
<sql:error-message-attribute>message</sql:error-message-attribute>
	
<sql:error-stacktrace-attribute>stacktrace</sql:error-stacktrace-attribute>
		<sql:error-message-text>A horrible error
occured</sql:error-message-text>
		<sql:query>select * from dept order by dname</sql:query>
	</sql:execute-query>
  </page>

</xsp:page>


The Browser displays only

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
                      "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>SQL
Ergebnisse</title></head><body><p><br></p><center><table
bgcolor="#000000"
border="0"
    cellpadding="0" cellspacing="0" width="60%"><tr><td width="100%"><table
border="0" cellpadding="4"
         width="100%"><tr><td align="right" bgcolor="#c0c0c0"
valign="middle"
         width="100%"><big><big>SQL Ergebnisse</big></big></td></tr><tr><td
bgcolor="#ffffff" width="100%">
  
  

        
           oracle.jdbc.driver.OracleDriver
           jdbc:oracle:thin:@martha:1521:orcl
           scott
           tiger
                departments
                dept
                lower
                yes
                id
                DEPTNO
                sqlerror
                message
                stacktrace
                A horrible error occured
                select * from dept order by dname
        
  </td></tr></table></td></tr></table></center><p
align="center"><font
size="-1">
      Copyright &copy; @year@ <a href="http://xml.apache.org">The Apache XML
Project</a>.<br>
      All rights reserved.
     </font></p></body></html>

<!-- This page was served in 121 milliseconds by Cocoon 1.7 -->

It seems that the sql tags are ignored.
What am I doing wrong?
A similar example with the SQL processor is working, so it's not the
connection url that's wrong.

Henning



Mime
View raw message