JSP实现树型组织架构(6)--包含文件connectinDB.jsp & orgConnInclude
发表于:2007-07-01来源:作者:点击数:
标签:
//connectionDB.jsp %@ page contentType=text/html;charset=Big5%%@ page import= java . sql .*%%Connection conn=null;try{Class.forName( oracle .jdbc.driver. Oracle Driver);String url=jdbc:oracle:thin:@192.168.56.199:1521:asdb;String user=syst
//connectionDB.jsp
<%@ page contentType="text/html;charset=Big5"%><%@ 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 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();}%>
原文转自:http://www.ltesting.net