-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of S P
Sent: Saturday, February 03, 2001 1:51 AM
To: [EMAIL PROTECTED]
Subject: Re: Error Accessing Connection pool
I have tested following JSP with Weblogic connection pool. It worked fine
with me. try if it works for u.
<%@ page language = "java" import="java.sql.*" %>
<%
try {
Connection con = null;
Class.forName("weblogic.jdbc.pool.Driver");
con = DriverManager.getConnection("jdbc:weblogic:pool:OraclePool");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from aclentries");
//rs.next();
rs.next();
while(rs.next()) {
for(int i=1;i<=2;i++) {
out.println(rs.getString(i));
}
}
//out.println(rs.getString(1));
rs.close();
con.close();
} catch(Exception e) {
out.println("Exception");
}
%>
>From: T A Flores <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Error Accessing Connection pool
>Date: Wed, 31 Jan 2001 06:55:18 -0800
>
>First of all why are you doing this in a JSP? Put it in a servlet or
>something. Also this has been discussed please see the archives.
>
>
>
>----- Original Message -----
>From: Yogeeta_Raghunathan <[EMAIL PROTECTED]>
>Date: Tuesday, January 30, 2001 11:09 pm
>Subject: Error Accessing Connection pool
>
> > Hi,
> > I created a connection pool under weblogic 5.1 server as
> > below.
> > weblogic.jdbc.connectionPool.bscsPool=\
> > url=jdbc:weblogic:oracle:IPAdd:Port,\
> > driver=weblogic.jdbc.oci.Driver,\
> > initialCapacity=4,\
> > maxCapacity=10,\
> > capacityIncrement=1,\
> > props=user=sysadm;password=sysadm;server=ServerName
> >
> > weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.bscsPool=bscsPool
> >
> > weblogic.allow.reserve.weblogic.jdbc.connectionPool.bscsPool=everyone
> > weblogic.allow.reset.weblogic.jdbc.connectionPool.oraclePool=everyone
> > weblogic.allow.shrink.weblogic.jdbc.connectionPool.oraclePool=everyone
> >
> >
> > The connection pool is created. When I am trying to access it from
> > my JSP as
> > below.
> >
> > try
> > {
> >
> > Context ctx = null;
> > System.setProperty("java.naming.factory.initial",
> > "weblogic.jndi.WLInitialContextFactory");
> > System.setProperty("java.naming.provider.url",
> > "t3://127.0.0.1:7001");
> >
> > ctx = new InitialContext();
> > javax.sql.DataSource ds = (javax.sql.DataSource)
> > ctx.lookup("bscsPool");
> > conn=ds.getConnection();
> > stmt = conn.createStatement();
> > System.out.println(conn);
> >
> > }
> > catch(Exception e)
> > {
> > out.println("Could not connect to the database"+e);
> > }
> >
> >
> >
> > I am getting the error as
> >
> > java.security.AccessControlException: access denied
> > (java.util.PropertyPermission java.naming.factory.initial write)
> >
> > Should I set some permission for the JSPs?
> >
> > Thank You
> > T R Yogeeta
> >
> >
>========================================================================
>===
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-
> > INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets