• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC connection in jsp page

 
rama jagannadharao kandregula
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use connection pooling in my jsp page for jdbc connecton,when i use connectionpooling the page is not working,if i directly write the jdbc connection in my jsp page it is working,i will send you my connectin pooling code.
------------------------------------------------------
<jsp:useBean id="galipool" class="com.sms.pool.smspool" scope="application">
<jsp:setProperty name="galipool" property="db" value="bvitslave"/>
</jsp:useBean>

con=galipool.cp.getConnection();
/*
code..........
*/
finaly{
if(rs!=null){rs.close();rs=null;}
if(st!=null){st.close();st=null;}
if(con!=null){con.close();con=null;}
}
------------------------------------------------------------------------

original mysql connection:-
-------------------------

Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://192.168.58.224:3306/jmailer_in","username","pwd"
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rama,
Please TellTheDetails. What do you mean "it didn't work." Did you get an error message?
 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to use context-param in your xml file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!