%--
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 .
--%>
<%@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"%>
<%
StringBuilder str = new StringBuilder();
List questions = MySQLUtils.getQuestionsFromDatabase();
%>
人机问答系统演示
人机问答系统演示 项目主页
<%
int i = 1;
for (Question question : questions) {
%>
Question <%=(i++)%> : <%=question.getQuestion()%>
<%
int j = 1;
for (Evidence evidence : question.getEvidences()) {
%>
Title <%=j%> : <%=evidence.getTitle()%>
Snippet <%=j%> : <%=evidence.getSnippet()%>
<%
j++;
}
%>
<%
}
if(questions.isEmpty()){
%>
MySQL中没有缓存任何数据或MySQL未启动
<%
}
%>