主页面
<%@page contenttype=”text/html;charset=gb2312″%>
<html>
<body>
<script language=”javascript”>
function err(form)
{
if (form.ejb_name.value==””)
{
window.alert(“请输入ejb名称”);
form.ejb_name.focus();
return false;
}
if (form.ejb_name.value.charat(0)<“a”||form.ejb_name.value.charat(0)>”z”)
{
if(window.confirm(“您输入的ejb名称第一个字母不是大写字母,是否修改”))
{
form.ejb_name.focus();
return false;
}
}
if (stringfilter(form.ejb_name.value)==1)
{
form.ejb_name.focus();
form.ejb_name.value=””;
return false;
}
return true;
}
function stringfilter(strfilter)
{
for (i=0;i<strfilter.length;i++)
{
if((strfilter.charat(i)>=”a” && strfilter.charat(i)<=”z”)||(strfilter.charat(i)>=”a”&&strfilter.charat(i)<=”z”)||(strfilter.charat(i)>=”0″&&strfilter.charat(i)<=”9″)||(strfilter.charat(i)==”_”))
{}
else
{
window.alert (“您的输入中有非法字符”);
return 1;
}
}
return 0;
}
</script>
<center>
<form action=”createejb.jsp” method=”post” name=”form1″ onsubmit=”return err(form1)”>
<table border=”1″ width=”500″>
<tr>
<td align=”right” width=”300″>
请选择服务器的类型:
</td>
<td align=”left” width=”200″>
<select name=”server_type”>
<option value=”weblogic”>weblogic</option>
</select>
</td>
</tr>
<tr>
<td align=”right” width=”300″>
请选择您要创建的ejb类型:
</td>
<td align=”left” width=”200″>
<select name=”ejb_type”>
<option value=”stateless”>stateless bean</option>
<option value=”stateful”>stateful bean</option>
<option value=”entity”>entity bean</option>
</select>
</td>
</tr>
<tr>
<td align=”right” width=”300″>
请输入您要创建的ejb名称:
<br><font color=”red”>(以后所有创建的ejb均以此名称作为开头,例如xxxhome,xxxremote,xxxejb)</font>
</td>
<td align=”left” width=”200″>
<input type=”text” name=”ejb_name”>
</td>
</tr>
<tr>
<td colspan=”2″ align=”center”><input type=”submit” value=”提交”> <input type=”reset” value=”重填”></td>
</tr>
</table>
</form>
</center>
</body>
</html>
