81,092
社区成员
发帖
与我相关
我的任务
分享
public String queryQuestion(){
try{
String wheres = request.getParameter("wheres"); //类型
String whereName = request.getParameter("whereName"); //条件
List<Tbquestion> list = question.queryTbquestion(wheres, whereName,getMeetingAll());
request.setAttribute("listQues", list);
}catch(Exception ex){
ex.printStackTrace();
}
return SUCCESS;
}
<action name="questionAction" class="questionAction">
<result name="success">/jsppages/visit/question/index.jsp</result>
</action>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="paging" uri="/WEB-INF/userTag/paging-tag.tld"%>
<%
String path = request.getContextPath();
pageContext.setAttribute("path",path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
下面只贴重要部分:
<c:forEach items="${listQues}" var="questionList" varStatus="indexNum">
<tr onclick="clickInfo('${questionList.qid}','<%=path %>/platform/questionAction!queryTbquestionById.action');" id="tr${indexNum.index}">
<td><input type="checkbox" name="cheAll" id="${questionList.qid}"/></td>
<td>${questionList.title}</td>
<td>${questionList.clientname}</td>
<td>${questionList.newtime}</td>
<td>${questionList.status}</td>
<td>
<a href="#"> 变更</a>-
<a href="#"> 编辑</a>
</td>
</tr>
</c:forEach>
12:18:49,171 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c in /jsppages/visit/question/index.jsp</h3><p>null: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.</p>
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:74)
at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1795)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1741)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:184)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户问题跟踪管理</title>
</head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'MyJsp.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">
</head>
<div class="page" style="position:relative;">
<span style="position: absolute; right: 25px;"> <paging:page
file="${path}/platform/questionAction!queryQuestion.action"
pageInfo="${requestScope.pageInfo}" /> </span>
</div>
这个也改一下:
div class="page" style="position:relative;">
<span style="position: absolute; right: 25px;"> <paging:page
file="<%=path %>/platform/questionAction!queryQuestion.action"
pageInfo="${requestScope.pageInfo}" /> </span>
<form name="Myform1" id="Myform1" action="${path}/platform/questionAction!queryQuestion.action" method="post">
改为:
<form name="Myform1" id="Myform1" action="<%=path %>/platform/questionAction!queryQuestion.action" method="post">
这样试试。
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="paging" uri="/WEB-INF/userTag/paging-tag.tld"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
pageContext.setAttribute("path",path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户问题跟踪管理</title>
<link href="<%=path %>/jsppages/visit/css/style.css" rel="stylesheet" type="text/css" />
<script src="<%=path %>/jsppages/visit/js/jquery-1.4.2.js" type="text/javascript"></script>
<script src="<%=path %>/jsppages/visit/js/tab.js" type="text/javascript"></script>
<script src="<%=path %>/js/commonJs.js" type="text/javascript"></script>
<script type="text/javascript">
/*
* 跳转到详情Action
* @param {Object} Id:当前数据Id
* @param {Object} url:Action路径
*/
function clickInfo(Id,url){
document.getElementById('ifame1').src = url+"?Id="+Id;
}
</script>
</head>
<body>
<form name="Myform1" id="Myform1" action="${path}/platform/questionAction!queryQuestion.action" method="post">
<div class="main">
<div class="title">
<div class="title_content">客户问题跟踪管理</div>
</div>
<div class="form">
<ul>
<li>
<select name="wheres" >
<option value="">----请选择----</option>
<option value="title">反馈标题</option>
<option value="clientname">客户姓名</option>
<option value="newtime">反馈时间</option>
</select>
<input type="text" name="whereName" />
<input type="button" value="查询" class="xbtn" />
</li>
</ul>
<div style="float:right; display:inline; margin:0; padding:0">
<input type="button" value="新增" class="xbtn" onclick="javascript:(location.href='add_question.html')" />
<input type="button" value="导出" class="xbtn" />
<input type="button" value="删除" class="xbtn" onclick="deleteInfo();" />
</div>
</div>
<table id="mytable">
<thead>
<tr>
<td><input type="checkbox" name="chePub" onclick="selAll(this,'cheAll');">全选</td>
<td>反馈标题</td>
<td>客户姓名</td>
<td>反馈时间</td>
<td>当前状态</td>
<td>操作</td>
</tr>
</thead>
<%--onclick="clickInfo('${questionList.qid}','<%=path %>/platform/questionAction!queryTbquestionById.action');" --%>
<tbody>
<%--
<s:iterator id="listQues" var="list">
<tr id="tr">
<td><input type="checkbox" name="cheAll" id="#list.qid"/></td>
<td><s:property value="#list.title" /></td>
<td><s:property value="#list.clientname" /></td>
<td><s:property value="#list.newtime" /></td>
<td><s:property value="#list.status" /></td>
<td>
<a href="#"> 变更</a>-
<a href="#"> 编辑</a>
</td>
</tr>
</s:iterator>
--%>
<c:forEach items="${listQues}" var="quesBean" varStatus="indexNum">
<tr id="tr${indexNum.index}">
<td><input type="checkbox" name="cheAll" id="${quesBean.qid}"/></td>
<td>${quesBean.title}</td>
<td>${quesBean.clientname}</td>
<td>${quesBean.newtime}</td>
<td>${quesBean.status}</td>
<td>
<a href="#"> 变更</a>-
<a href="#"> 编辑</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page" style="position:relative;">
<span style="position: absolute; right: 25px;"> <paging:page
file="${path}/platform/questionAction!queryQuestion.action"
pageInfo="${requestScope.pageInfo}" /> </span>
</div>
<iframe id="ifame1" name="dexInfo" width="100%" height="100%"
scrolling="auto" marginwidth="0" frameborder="0" >
</iframe>
<script type="text/javascript">
$("#tr0").addClass("selected");
$("table tbody tr").each(function(i){
$(this).click(function(){
$("table tbody tr").each(function(j){
$(this).removeClass("selected");
});
$(this).addClass("selected");
});
$(this).blur();
});
$("#tr0").click();
$("#tr0").addClass("selected");
</script>
</div>
</form>
<script language="javascript" src="<%=path %>/jsppages/visit/js/table.js"></script>
</body>
</html>
for (Tbquestion t : list) {
System.out.println(t.getQid());
System.out.println(t.getNewtime());
System.out.println(t.getClientname());
System.out.println(t.getTitle());
System.out.println(t.getStatus());
}
<c:if test="${null != listQues}">
<c:forEach items="${listQues}" var="questionList" varStatus="indexNum">
<tr onclick="clickInfo('${questionList.qid}','<%=path %>/platform/questionAction!queryTbquestionById.action');" id="tr${indexNum.index}">
<td><input type="checkbox" name="cheAll" id="${questionList.qid}"/></td>
<td>${questionList.title}</td>
<td>${questionList.clientname}</td>
<td>${questionList.newtime}</td>
<td>${questionList.status}</td>
<td>
<a href="#"> 变更</a>-
<a href="#"> 编辑</a>
</td>
</tr>
</c:forEach>
</c:if>
<s:iterator id="listQues" var="list">
<tr id="tr">
<td><input type="checkbox" name="cheAll" id="#list.qid"/></td>
<td><s:property value="#list.title" /></td>
<td><s:property value="#list.clientname" /></td>
<td><s:property value="#list.newtime" /></td>
<td><s:property value="#list.status" /></td>
<td>
<a href="#"> 变更</a>-
<a href="#"> 编辑</a>
</td>
</tr>
</s:iterator>