📄 setup3.jsp
字号:
<%@ page session="true" contentType="text/html; charset=GB2312" %>
<%
/**
* Title: 校园.NET
* Description: 中国第五代(城域网-校园网)项目
* Copyright: Copyright (c) 2001
* Company: 赛灵通
* @author 宋新华
* @version 1.0
*/
%>
<%@ page import="java.io.*,
java.util.*,
java.sql.*,
net.xerllent.campus.*,
net.xerllent.campus.util.*,
net.xerllent.campus.database.*"%>
<html>
<head>
<title>Xerllent Setup - Step 3</title>
<link rel="stylesheet" href="style/global.css">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<font size="5">Xerllent产品安装</font>
<hr size="0">
<p>
<%
boolean error = false;
String errorMessage = null;
//Make sure the install has not already been completed.
String setup = PropertyManager.getProperty("setup");
if( setup != null && setup.equals("true") ) {
error = true;
errorMessage = "系统数据库链接已经完成,如果还需要使用此工具建立新的数据库连接,请删除 xerllent.properties文件中的‘setup=true’参数";
}
DatabaseMetaData metaData = null;
Connection con = null;
if (!error) {
try {
con = DbConnectionManager.getConnection();
metaData = con.getMetaData();
PropertyManager.setProperty( "setup", "true" );
}
catch( Exception e ) {
e.printStackTrace();
}
}
%>
<%
if (!error) {
try {
%>
<b>数据库连接信息</b>
<ul>
系统成功连接到数据库,请点击“完成”按钮,开始登录系统。
<p>
<table cellpadding="2" cellspacing="2" border="0">
<tr>
<td colspan="2"><font size="-1"><b>Database Properties</b></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Name:</font></td>
<td><font size="-1"><%= metaData.getDatabaseProductName() %></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Version:</font></td>
<td><font size="-1"><%= metaData.getDatabaseProductVersion() %></font></td>
</tr>
<tr>
<td colspan="2"><br>
<b><font size="-1">JDBC Driver Properties</font></b></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Driver:</font></td>
<td><font size="-1"><%= metaData.getDriverName() %>, version <%= metaData.getDriverVersion() %></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Connection URL:</font></td>
<td><font size="-1"><%= metaData.getURL() %></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Connection username:</font></td>
<td><font size="-1"><%= metaData.getUserName() %></font></td>
</tr>
<tr>
<td colspan="2"><br>
<b><font size="-1">Database Capabilities</font></b></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Supports transactions?</font></td>
<td><font size="-1"><%= (metaData.supportsTransactions())?"Yes":"No" %></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Supports multiple connections <br>
open at once?</font></td>
<td><font size="-1"><%= (metaData.supportsMultipleTransactions())?"Yes":"No" %></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font size="-1">Is in read-only mode?</font></td>
<td><font size="-1"><%= (metaData.isReadOnly())?"Yes":"No" %></font></td>
</tr>
</table>
<% con.close();
}
catch( Exception e ) {}
%>
</ul>
<form action="/prog/login.jsp" method="get">
<center>
<input type="submit" value="完 成">
</center>
</form>
<% } //end no error
else {
%>
<font color="Red">错误!</font>
<p><font size=2>
<%= errorMessage %>
</font>
<%
} //end error
%>
<p>
<hr size="0">
<center>
<font size="-1"><i>www.xerllent.cn</i></font>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -