📄 index.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"import="java.unil.*" errorPage=""%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<body background="E:\壁纸\20081161239130.jpg" >
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
<!--
.STYLE1 {font-size: 10px}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="MyJsp.jsp" >
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr style="vertical-align: top">
<th colspan="2" class="HeaderColor">
<h1><!-- TemplateBeginEditable name="Header" --> 动物识别系统<!-- TemplateEndEditable --></h1></th>
</tr>
</table>
<br>
<table width="798" border="0" cellspacing="2" cellpadding="4" height="204">
<!-- TemplateBeginRepeat name="Row" -->
<tr style="vertical-align: top">
<!-- TemplateBeginRepeat name="Column" -->
<td height="140">
<!-- TemplateBeginEditable name="Question1" -->
<p class="StoryContentColor STYLE1">请选择该种动物的特征:</p>
<p class="StoryContentColor">
<input name="hair" type="checkbox" value="1">
No.1 该动物有毛发
<br>
<input name="milk" type="checkbox" value="2">
No.2 该动物有奶
<br>
<input name="feather" type="checkbox" value="3">
No.3 该动物有羽毛
<br>
<input name="fly" type="checkbox" value="4">
No.4 该动物会飞
<br>
<input name="egg" type="checkbox" value="5">
No.5 该动物会下蛋
<br>
<input name="meat" type="checkbox" value="6">
No.6 该动物吃肉
<br>
<input name="tooth" type="checkbox" value="7">
No.7 该动物有犬齿
<br>
<input name="talon" type="checkbox" value="8">
No.8 该动物有爪
<br>
<input name="forward" type="checkbox" value="9">
No.9 该动物眼盯前方
<br>
<input name="lactation" type="checkbox" value="10">
No.10 该动物是哺乳动物
<br>
<input name="bird" type="checkbox" value="11">
No.11 该动物是鸟
<br>
<input name="flesh" type="checkbox" value="12">
No.12 该动物是肉食动物
<br>
<input name="unguis" type="checkbox" value="13">
No.13 该动物有蹄
<br>
<input name="hoof" type="checkbox" value="14">
No.14 该动物是有蹄类动物
<br>
<input name="ruminant" type="checkbox" value="15">
No.15 该动物是嚼反刍动物
<br>
<input name="tan" type="checkbox" value="16">
No.16 该动物是黄褐色
<br>
<input name="spot" type="checkbox" value="17">
No.17 该动物身上有暗斑点
<br>
<input name="list" type="checkbox" value="18">
No.18 该动物身上有黑色条纹
<br>
<input name="neck" type="checkbox" value="19">
No.19 该动物有长脖子
<br>
<input name="leg" type="checkbox" value="20">
No.20 该动物有长腿
<br>
<input name="notfly" type="checkbox" value="21">
No.21 该动物不会飞
<br>
<input name="swim" type="checkbox" value="22">
No.22 该动物会游泳
<br>
<input name="whiteblack" type="checkbox" value="23">
No.23 该动物有黑白二色
<br>
<input name="flybetter" type="checkbox" value="24">
No.24 该动物善飞 </p>
<!-- TemplateEndEditable -->
</td>
<!-- TemplateEndRepeat -->
</tr>
<%
try
{Class.forName("org.gjt.mm.mysql.Driver").newInstance();}
catch(ClassNotFoundException e){out.print("error");}
try
{
String url = "jdbc:mysql://localhost:3306/ai?user=root&password=";
Connection conn = DriverManager.getConnection(url);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql="select * from fact where flag=1;";
ResultSet rs=stmt.executeQuery(sql);
rs.last();
int counteroft=rs.getRow();
sql="select distinct ruleid from rule;";
rs=stmt.executeQuery(sql);
rs.last();
int counterrule=rs.getRow();
sql="select * from fact where flag=0;";
rs=stmt.executeQuery(sql);
rs.last();
int counter=rs.getRow();
session.setAttribute("factCounter",counter);}
catch(SQLException e2){out.print("error");}
%>
<!-- TemplateEndRepeat -->
<tr style="vertical-align: top">
<td>
<!-- TemplateBeginEditable name="Buttons" -->
<input type="submit" name="submit" value="提交">
<!-- TemplateEndEditable -->
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -