Hello-

I am new to JSTL and JSP, so this may not apply, but I figured I would share anyway.

I use Caucho Resin and do the following:

In my resin.conf:

<resource-ref>
  <res-ref-name>jdbc/test</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <init-param driver-name="com.caucho.jdbc.mysql.Driver"/>
  <init-param url="jdbc:mysql-caucho://localhost:3306/test"/>
</resource-ref>

in my .jsp page:

<sql:setDataSource dataSource="jdbc/test" />


Doesn't this seem reasonable?

-chris

-----Original Message-----
From: Lorenzo Sicilia [mailto:arnor@;kemen.it] 
Sent: Wednesday, October 30, 2002 11:28 AM
To: Tag Libraries Users List
Subject: Re: jrun & jstl

Shawn Bayern wrote:
> It's a fairly general topic.  Typically, to instantiate a DataSource, you
> just use a class that a database vendor provides -- or alternatively a
> pooling DataSource that can be layered on top of any driver, as in the
> DBCP package from Jakarta Commons at
> 
>   http://jakarta.apache.org/commons/dbcp.html
> 

I use JRUN4 and Mysql.
I have com.mysql.jdbc.Driver OpenSource and org.gjt.mm.mysql.Driver by 
Macromedia.
Are there Class database vendor provides?

with this tag:

<sql:setDataSource url="jdbc:mysql://localhost:3306/aostacompany" 
driver="org.gjt.mm.mysql.Driver" />

It work fine but I think there is not pooling

with this tag:

<sql:setDataSource driver="com.mysql.jdbc.Driver" dataSource="aosta_db"/>

It don't work
I receive this error:
javax.servlet.jsp.JspException: Unable to get connection, DataSource 
invalid: "No suitable driver"

> Security.  Using '?' and <c:param> ensures that any dangerous characters
> will be escaped.  By "dangerous," I mean characters like a single quote
> (') that could alter the sense of your SQL statement and end up hijacking
> it to produce unintended results.
Ok, but I think the true problem is about INSERT or DELETE. Select is 
not very dangerous. or no?

Thanks very much.

Lorenzo Sicilia



--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>

Reply via email to