-1
我收到了struts 2的一个非常奇怪的问题,我使用s:iterator来提取问题列表,但是当我使用s :属性标签,只有ID会显示,没有别的。有4列,id,groupid,subgroupid和questiontxt,但我似乎只能够显示ID。我测试了列表,它包含所有的列,它已经从数据库中正确保存了它们,但是我能够在屏幕上显示的唯一东西就是ID。Struts 2只在jsp上使用s来显示mysql表中的一行:iterator
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href=<s:url value="resources/welcome.css" /> rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome</title>
</head>
enter code here
<body>
<table>
<s:iterator value="listQuestionsBasic" var="question">
<tr>
<td>
<s:property value="#question.id" />
</td>
</tr>
<tr>
<td>
<s:property value="#question.groupid" />
</td>
</tr>
<tr>
<td>
<s:property value="#question.subgroupid" />
</td>
</tr>
<tr>
<td>
<s:property value="#question.questiontxt" />
</td>
</tr>
</s:iterator>
</table>
</body>
</html>