setup3.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:3k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * Jive Setup Tool
- * November 28, 2000
- */
- %>
- <%@ page import="java.io.*,
- java.util.*,
- java.sql.*,
- com.coolservlets.forum.*,
- com.coolservlets.forum.util.*,
- com.coolservlets.forum.database.*"%>
- <html>
- <head>
- <title>BBS设置-第三步</title>
- <link rel="stylesheet" href="style/global.css">
- </head>
- <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <img src="images/setup.gif" width="210" height="38" alt="BBS设置" border="0">
- <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 = "BBS设置已经完成,如果您想重新设置,请删除jive.properties配置文件中'setup=true'字段,然后再试。";
- }
- DatabaseMetaData metaData = null;
- Connection con = null;
- if (!error) {
- try {
- con = DbConnectionManager.getConnection();
- metaData = con.getMetaData();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
- %>
- <%
- if (!error) {
- try {
- %>
- <b>数据库信息</b>
- <ul>
- <font size="2">
- 设置程序成功建立数据库连接,请点击下一步继续.....。
- <p>
- <table cellpadding="2" cellspacing="2" border="0">
- <tr>
- <td colspan="2"><font size="-1"><b>数据库属性</b></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">名称:</font></td>
- <td><font size="-1"><%= metaData.getDatabaseProductName() %></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">版本:</font></td>
- <td><font size="-1"><%= metaData.getDatabaseProductVersion() %></font></td>
- </tr>
- <tr>
- <td colspan="2"><br><b><font size="-1">JDBC驱动属性</font></b></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">驱动:</font></td>
- <td><font size="-1"><%= metaData.getDriverName() %>, version <%= metaData.getDriverVersion() %></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">连接符:</font></td>
- <td><font size="-1"><%= metaData.getURL() %></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">连接用户名:</font></td>
- <td><font size="-1"><%= metaData.getUserName() %></font></td>
- </tr>
- <tr>
- <td colspan="2"><br><b><font size="-1">数据库性能</font></b></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">支持事务处理?</font></td>
- <td><font size="-1"><%= (metaData.supportsTransactions())?"是":"否" %></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">支持多连接?</font></td>
- <td><font size="-1"><%= (metaData.supportsMultipleTransactions())?"是":"否" %></font></td>
- </tr>
- <tr>
- <td bgcolor="#eeeeee"><font size="-1">只读模式?</font></td>
- <td><font size="-1"><%= (metaData.isReadOnly())?"是":"否" %></font></td>
- </tr>
- </table>
- <% con.close();
- }
- catch( Exception e ) {}
- %>
- <form action="setup4.jsp" method="post">
- </ul>
- <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.visionnex.com</i></font></center>
- </font>
- </body>
- </html>