Hi Martin, thanks for anwering my message.

This is a part
of my web.xml, there's nothing interesting in that

<wbe-app>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <resource-ref>
    <description>DataSource de
MySQL</description>
   
<res-ref-name>jdbc/Mytest</res-ref-name>
    <res-auth>Container</res-auth>
   
<res-sharing-scope>Shareable</res-sharing-scope>
</web-app>

This is a part of my context.xml, I guess
that here's the problem...

<?xml version="1.0"
encoding="UTF-8"?>
<Context
path="/prueba4">
  <Logger
clasName="org.apache.catalina.logger.FileLogger"
prefix="prueba4." suffix=".log"
timestamp="true"/>
  <Resource
name="jdbc/Mytest" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/Mytest">
    <parameter>
     
<name>url</name>
     
<value>jdbc:mysql://localhost:3306/test?autoReconnect=true</valure>
    </parameter>
   
<parameter>
     
<name>driverClassName</name>
     
<value>com.mysql.jdbc.Driver</value>
   
</parameter>
    <parameter>
      <name>username</name>
      <value>myuser</value>
    </parameter>
   
<parameter>
     
<name>password</name>
     
<value>mypass</value>
   
</parameter>
    <parameter>
     
<name>validationQuery</name>
      <value>select
now()</value>
  </ResourceParams>
</Context>

This is part of my JSP (index.jsp)

<[EMAIL PROTECTED] prefix="sql" uri="http://java.sun.com/jstl/sql"%>
<[EMAIL PROTECTED]
prefix="c" uri="http://java.sun.com/jstl/core";
%>
<html>
  <head>
    <title>JSP Page</title>
 
</head
  <body>
    <h1>JSP
Page</h1>
    <sql:query var="rs"
dataSource="jdbc/Mytest">
     
select id_padre, id_hijo from my_hijo
   
</sql:query>
    <table
border="1">
      <!--
columm headers -->
      <tr>
        <c:forEach
var="columnName" items="${rs.columnNames}">
         
<th><c:out value="${columnName}"/></th>
        </c:forEach>
      </tr>
      <!-- columm data -->
        <c:forEach
var="row" itmes="${rs.rowsByIndex}">
          <tr>
           
<c:forEach var="column" items="${row}">
             
<td><c:out value="${column}"/></td>
           
</c:forEach>
          </tr>
        </c:forEach>
    </table>
  </body>
</html>

I don't really know which is the problem, I've
tried with some solutions but they seem not work..

Any magic
solution....?

Saludos 
Lsi. Carlos Puero C. 
Guayaquil-Ecuador

---------------------------- Mensaje
original ---------------------------- 
Asunto: Re: Problems with
Tomcat 5.0.28 and Netbeans 5.0 
De: "Martin Grogan"
<[EMAIL PROTECTED]> 
Fecha: Mie, 6 de Septiembre de
2006, 2:14 am 
Para: "Tomcat Users List"
<users@tomcat.apache.org> 
--------------------------------------------------------------------------


Hi Carlos, 
Can you post the relevant snippets from your
web.xml, context.xml and 
servlet init() method (where you
instansiate the connection pool)? 
Martin 


Carlos
Puero C. wrote: 
> 
> Hi everybody, I got a problem... And
I'd like your help 
> 
> I 
> use NetBeans 5.0
with Tomcat 5.0.28 and MySQL 5.0.21, I try to crate a 
>
connection pool from Tomcat to Mysql, I followed all the steps that I've

> found on similar forums, and my frustration is that appears an
error: No 
> Suitable Driver... 
> 
> In the
forums say that it means that my url 
> of connection is mal
formed... I try with the same url a test with a 
> single class,
calling Class.forName method and.... The url is ok.... 
> 
> I put the code of the configuration of the pool in the files 
> web.xml and context.xml, becuase I read that.... but it doesn't
work... 
> Any suggestion....? 
> 
> PD: I put the
MySQL/J Connector in 
> TOMCAT_HOME/commos/lib.... 
> 
> Thanks a lot... 
> 
> 


-- 
------------ 
Martin Grogan 
Keizen Software 

[EMAIL PROTECTED] 
www.keizensoftware.com 


---------------------------------------------------------------------

To start a new topic, e-mail: users@tomcat.apache.org 
To
unsubscribe, e-mail: [EMAIL PROTECTED] 
For
additional commands, e-mail: [EMAIL PROTECTED] 


Reply via email to