📄 dsdatasource.jsp
字号:
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="epod.setup.constant.*,epod.setup.*,epod.util.*,epod.database.constant.*"%>
<%@ include file="common.jsp" %>
<%@ taglib uri="/WEB-INF/epod-html.tld" prefix="epod" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Epod setup</title>
<link href="../lib/style.css" rel="stylesheet" type="text/css">
</head>
<%
session.setAttribute("epod.setup.datasource","1");
String jndiName = RequestUtil.getString(request,"jndiName",EpodProperties.getConfig(SetupConstant.EPOD_PROPERTIES,DBConstants.DEFAULTDATABASE+DBConstants.POOL));
String jndiClass = RequestUtil.getString(request,"jndiClass",EpodProperties.getConfig(SetupConstant.EPOD_PROPERTIES,DBConstants.DEFAULTDATABASE+DBConstants.JNDI));
String jndiURL = RequestUtil.getString(request,"jndiURL","");
String ope = RequestUtil.getString(request,"operator","");
boolean test = true;
if(ope.equals("0")){
STDataSource datasourse = new STDataSource();
test = datasourse.setJNDI(request);
if(test){
response.sendRedirect("createdb.jsp");
}
}
pageContext.setAttribute("dsoptions", STDataSource.getDSOptions());
%>
<body>
<table cellpadding="0" cellspacing="0" align="center" width="100%">
<tr>
<td height="62" colspan="2">
<%@ include file="header.jsp" %>
</td>
</tr>
<tr valign="top">
<td width="172" height="289">
<%@ include file="sidebar.jsp" %>
<p> </p></td>
<td width="607">
<form name="form1" method="post" action="dsdatasource.jsp">
<INPUT TYPE="hidden" name='operator' value=''>
<table width="100%" border=0 cellpadding=1 cellspacing=1 class="unit_table">
<tr class="page_desc">
<td height="34" colspan="2" class="cell_null">DataSource方式
<%if(!test){%>
<p>
<font color=red>建立数据库链接失败,请确认输入数据库信息是否正确。</font>
</p>
<%}%>
</td>
</tr>
<tr>
<td width="33%" class="cell_right">Database Driver:
</td>
<td width="67%" class="cell_left">
<epod:select property="ds" collection="dsoptions" onchange="setds(this)" optvalue="value" optname="lable"/>
</td>
</tr>
<tr>
<td width="33%" class="cell_right"> JNDI Datasource Name: </td>
<td width="67%" class="cell_left"><input type="text" name="jndiName"></td>
</tr>
<tr>
<td width="33%" class="cell_right"> JNDI Class: </td>
<td width="67%" class="cell_left"><input type="text" name="jndiClass"></td>
</tr>
<tr>
<td width="33%" class="cell_right"> JNDI Provider URL: </td>
<td width="67%" class="cell_left"><input type="text" name="jndiURL"></td>
</tr>
</table>
<div align="right">
<input type="button" name="ds_Submit" value="下一步" onclick=setJNDI('0')>
</div>
</form>
</td>
</tr>
<tr>
<td colspan="2">
<%@ include file="footer.jsp" %>
</td>
</tr>
</table>
</body>
<SCRIPT LANGUAGE="JavaScript">
<!--
function setJNDI(ope){
document.all('operator').value=ope;
document.forms[0].submit();
}
init();
function init(){
document.all('jndiName').value='<%=jndiName%>';
document.all('jndiClass').value='<%=jndiClass%>';
document.all('jndiURL').value='<%=jndiURL%>';
}
//-->
</SCRIPT>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -