//ConnectionDB.jsp
<% @ Page ContentType = "Text / HTML; Charset = BIG5"%> <% @ page import = "java.sql. *"%> <% connection conn = null; try {class.forname ("Oracle.JDBC. Driver.racledriver "); string url =" JDBC: Oracle: Thin: @ 192.168.56.199: 1521: asdb "; string user =" system "; string password =" oracle01 "; conn = drivermanager.getConnection (URL, User, Password);} catch (Exception E1) {E1.PrintStackTrace ();}
%>
//orgconninclude.jsp
<% @ Page Import = "java.sql. *"%>
<% Connection conn = null; try {class.forname ("oracle.jdbc.driver.Oracledriver); string url =" JDBC: Oracle: Thin: @ 192.168.56.199: 1521: asdb "; string user =" system " String password = "Oracle01"; conn = drivermanager.getConnection (URL, User, Password);} catch (exception se1) {se1.printstacktrace ();}%>