forked from ysc/QuestionAnsweringSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.jsp
More file actions
62 lines (58 loc) · 2.46 KB
/
Copy pathall.jsp
File metadata and controls
62 lines (58 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<%--
APDPlat - Application Product Development Platform
Copyright (c) 2013, 杨尚川, yang-shangchuan@qq.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="org.apdplat.qa.util.MySQLUtils"%>
<%@page import="org.apdplat.qa.model.Question"%>
<%@page import="org.apdplat.qa.model.Evidence"%>
<%@page import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
StringBuilder str = new StringBuilder();
List<Question> questions = MySQLUtils.getQuestionsFromDatabase();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>人机问答系统演示</title>
</head>
<body>
<h1><font color="blue">人机问答系统演示 <a href="https://github.com/ysc/QuestionAnsweringSystem" target="_blank">项目主页</a></font></h1>
<%
int i = 1;
for (Question question : questions) {
%>
<font color="red">Question <%=(i++)%> : <%=question.getQuestion()%></font><br/>
<%
int j = 1;
for (Evidence evidence : question.getEvidences()) {
%>
<font color="red"> Title <%=j%> : </font> <%=evidence.getTitle()%><br/>
<font color="red"> Snippet <%=j%> : </font> <%=evidence.getSnippet()%><br/>
<%
j++;
}
%>
<br/>
<br/>
<%
}
if(questions.isEmpty()){
%>
MySQL中没有缓存任何数据或MySQL未启动
<%
}
%>
</body>
</html>