aspose file tools*
The moose likes JSP and the fly likes Connection pooling in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Connection pooling in jsp" Watch "Connection pooling in jsp" New topic
Author

Connection pooling in jsp

jyothi nalam
Greenhorn

Joined: Oct 25, 2006
Posts: 24
I am not able to connect to the database. following are the files that could help you help me,
server.xml

<Resource
name="jndi"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
password="tiger"
maxIdle="2"
maxWait="5000"
username="scott"
url="jdbcracle:thin:@localhost:1521rcl"
maxActive="4"/>

web.xml

<resource-ref>
<description>DB Connection Pooling</description>
<res-ref-name>jndi</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth> Container</res-auth>
</resource-ref>

my jsp file


<%@ taglib uri="/WEB-INF/sql.tld" prefix="sql" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<html>
<head>
<title>DB Test</title>
</head>


<body>

<h2>Results</h2>
<sql:query var="rs" dataSource="jndi">
select * from games
</sql:query>

<c:forEach var="row" items="${rs.rowsByIndex}">
<cut value="${row[0]}"/>
</c:forEach>

<input type="submit" value="delete"/><br>

</form></body></html>

My Error is
Cannot create JDBC driver of class '' for connect URL 'null'"
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

jyothi t,
Welcome to JavaRanch!

We're pleased to have you here with us in the JSP forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can use an initial for the first name but not the last.

You can change it here


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection pooling in jsp
 
Similar Threads
unable to implement connection pooling in sybase
unable to implement connection pooling with sybase
DataSource Invalid
Connection pooling for Ms SQL
How to retrieve data from database, using servlet or a jsp?