?? step_4_database_setup.jsp
字號:
<%@ page import="org.opencms.setup.*,java.util.*" session="true" %><%--
--%><jsp:useBean id="Bean" class="org.opencms.setup.CmsSetupBean" scope="session" /><%--
--%><jsp:setProperty name="Bean" property="*" /><%
// next page
String nextPage = "../../step_4a_database_validation.jsp";
// previous page
String prevPage = "../../step_2_check_components.jsp";
boolean isFormSubmitted = Bean.setDbParamaters(request, CmsSetupBean.MYSQL_PROVIDER);
%>
<%= Bean.getHtmlPart("C_HTML_START") %>
Alkacon OpenCms Setup Wizard
<%= Bean.getHtmlPart("C_HEAD_START") %>
<%= Bean.getHtmlPart("C_STYLES") %>
<%= Bean.getHtmlPart("C_STYLES_SETUP") %>
<%= Bean.getHtmlPart("C_SCRIPT_HELP") %>
<script type="text/javascript">
<!--
function checkSubmit() {
if(document.forms[0].dbCreateConStr.value == "") {
alert("Please insert the Connection String");
document.forms[0].dbCreateConStr.focus();
return false;
}
else if (document.forms[0].db.value == "") {
alert("Please insert a Database name");
document.forms[0].db.focus();
return false;
}
else {
return true;
}
}
<%
if(isFormSubmitted) {
out.println("location.href='"+nextPage+"';");
}
%>
//-->
</script>
<%= Bean.getHtmlPart("C_HEAD_END") %>
<% if (Bean.isInitialized()) { %>
Alkacon OpenCms Setup Wizard - <%= Bean.getDatabaseName(Bean.getDatabase()) %> database setup
<%= Bean.getHtmlPart("C_CONTENT_SETUP_START") %>
<form method="post" onSubmit="return checkSubmit()" class="nomargin">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
<tr><td style="vertical-align: top;">
<%= Bean.getHtmlPart("C_BLOCK_START", "Database") %>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td>Select Database</td>
<td>
<select name="database" style="width: 250px;" size="1" onchange="location.href='../../step_3_database_selection.jsp?database='+this.options[this.selectedIndex].value;">
<!-- --------------------- JSP CODE --------------------------- -->
<%
/* get all available databases */
List databases = Bean.getSortedDatabases();
/* List all databases found in the dbsetup.properties */
if (databases !=null && databases.size() > 0) {
for(int i=0;i<databases.size();i++) {
String db = (String) databases.get(i);
String dn = Bean.getDatabaseName(db);
String selected = "";
if(Bean.getDatabase().equals(db)) {
selected = "selected";
}
out.println("<option value='"+db+"' "+selected+">"+dn);
}
}
else {
out.println("<option value='null'>no database found");
}
%>
<!-- --------------------------------------------------------- -->
</select>
</td>
<td><%= Bean.getHtmlHelpIcon("6", "../../") %></td>
</tr>
</table>
<%= Bean.getHtmlPart("C_BLOCK_END") %>
</td></tr>
<tr><td style="vertical-align: middle;">
<div class="dialogspacer" unselectable="on"> </div>
<iframe src="database_information.html" name="dbinfo" style="width: 100%; height: 80px; margin: 0; padding: 0; border-style: none;" frameborder="0" scrolling="no"></iframe>
<div class="dialogspacer" unselectable="on"> </div>
</td></tr>
<tr><td style="vertical-align: bottom;">
<%= Bean.getHtmlPart("C_BLOCK_START", "Database specific settings") %>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td> </td>
<td>User</td>
<td>Password</td>
<td> </td>
</tr>
<tr>
<td>Setup Connection</td>
<td><input type="text" name="dbCreateUser" size="8" style="width:150px;" value='<%= Bean.getDbCreateUser() %>'></td>
<td style="text-align: right;"><input type="text" name="dbCreatePwd" size="8" style="width:150px;" value='<%= Bean.getDbCreatePwd() %>'></td>
<td><%= Bean.getHtmlHelpIcon("1", "../../") %></td>
</tr>
<tr>
<td>OpenCms Connection</td>
<td><input type="text" name="dbWorkUser" size="8" style="width:150px;" value='<%= Bean.getDbWorkUser() %>'></td>
<td style="text-align: right;"><input type="text" name="dbWorkPwd" size="8" style="width:150px;" value='<%= Bean.getDbWorkPwd() %>'></td>
<td><%= Bean.getHtmlHelpIcon("2", "../../") %></td>
</tr>
<tr>
<td>Connection String</td>
<td colspan="2"><input type="text" name="dbCreateConStr" size="22" style="width:315px;" value='<%= Bean.getDbCreateConStr() %>'></td>
<td><%= Bean.getHtmlHelpIcon("3", "../../") %></td>
</tr>
<tr>
<td>Database</td>
<td colspan="2"><input type="text" name="db" size="22" style="width:315px;" value='<%= Bean.getDb() %>'></td>
<td><%= Bean.getHtmlHelpIcon("4", "../../") %></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><input type="checkbox" name="createDb" value="true" checked> Create database and tables
</td>
<td><%= Bean.getHtmlHelpIcon("5", "../../") %></td>
</tr>
</table>
<%= Bean.getHtmlPart("C_BLOCK_END") %>
</td></tr>
</table>
<%= Bean.getHtmlPart("C_CONTENT_END") %>
<%= Bean.getHtmlPart("C_BUTTONS_START") %>
<input name="back" type="button" value="<< Back" class="dialogbutton" onclick="location.href='<%= prevPage %>';">
<input name="submit" type="submit" value="Continue >>" class="dialogbutton">
<input name="cancel" type="button" value="Cancel" class="dialogbutton" onclick="location.href='../../index.jsp';" style="margin-left: 50px;">
</form>
<%= Bean.getHtmlPart("C_BUTTONS_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "1") %>
The <b>Setup Connection</b> is used <i>only</i> during this setup process.<br> <br>
The specified user must have database administration permissions in order to create the database and tables.
This user information is not stored after the setup is finished.
<%= Bean.getHtmlPart("C_HELP_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "2") %>
The <b>OpenCms Connection</b> is used when running Alkacon OpenCms after the installation.<br> <br>
For security reasons, the specified user should <i>not</i> have database administration permissions.
This user information is stored in the <code>opencms.properties</code> file after the setup.
<%= Bean.getHtmlPart("C_HELP_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "3") %>
Enter the JDBC <b>Connection String</b> to your database.
<%= Bean.getHtmlPart("C_HELP_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "4") %>
Enter the name of the MySQL <b>Database</b> which should be used by Alkacon OpenCms.
<%= Bean.getHtmlPart("C_HELP_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "5") %>
The setup wizard <b>creates</b> the MySQL database and the tables for Alkacon OpenCms.<br> <br>
<b>Attention</b>: Existing databases will be overwritten!<br> <br>
Uncheck this option if an already existing database should be used.
<%= Bean.getHtmlPart("C_HELP_END") %>
<%= Bean.getHtmlPart("C_HELP_START", "6") %>
<b>MySQL configuration notes:</b><br> <br>
MySQL limits the size of packets which can be stored in the database.
In order to increase the maximum file size for Alkacon OpenCms,
you have to adjust this setting for MySQL.<br> <br>
Locate the file <code>mysql.ini</code> (Windows systems) respectively <code>mysql.conf</code> (Unix systems) and add the line<br>
<code>set-variable=<br>max_allowed_packet=8M</code><br>
to increase the size e.g. to 8 MB.<br><br>
MySQL <b>3.2.x</b> versions support packets up to 16 MB,
MySQL versions <b>4.0.x</b> are only limited by the amount of available memory on the server.
<%= Bean.getHtmlPart("C_HELP_END") %>
<% } else { %>
Alkacon OpenCms Setup Wizard - Database setup
<%= Bean.getHtmlPart("C_CONTENT_SETUP_START") %>
<%= Bean.displayError("../../")%>
<%= Bean.getHtmlPart("C_CONTENT_END") %>
<% } %>
<%= Bean.getHtmlPart("C_HTML_END") %>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -