JSP Implementation Tree Organization Architecture (6) - Contains File Connectindb.jsp & ORGConninclude.jsp

xiaoxiao2021-03-06  20

//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 ();}%>

转载请注明原文地址:https://www.9cbs.com/read-39748.html

New Post(0)