为什么在struts2.0中用<s:iterator>在jsp页面无法显示?
<%@pagelanguage="java"import="java.util.*"pageEncoding="GB18030"%><%@tagliburi="/stru...
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
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>
<base href="<%=basePath%>">
<title>Ns3.0</title>
</head>
<%@taglib prefix="s" uri="/struts-tags" %>
<body>
<table border="1">
<s:iterator id="TryquicklyUser" value="users">
<tr>
<td>姓名:</td><td><s:property value="name"/></td>
</tr>
<tr>
<td>密码:</td><td><s:property value="pws"/></td>
</tr>
<tr>
<td>id:</td><td><s:property value="id"/></td>
</tr>
</s:iterator>
</table>
</body>
</html>
跑起来什么都不显示 连<td>里的姓名都不显示。删掉value也不显示 痴肥删掉</s:iterator>
问 是缺jar包吗?配置多次检查应该没问题 展开
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
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>
<base href="<%=basePath%>">
<title>Ns3.0</title>
</head>
<%@taglib prefix="s" uri="/struts-tags" %>
<body>
<table border="1">
<s:iterator id="TryquicklyUser" value="users">
<tr>
<td>姓名:</td><td><s:property value="name"/></td>
</tr>
<tr>
<td>密码:</td><td><s:property value="pws"/></td>
</tr>
<tr>
<td>id:</td><td><s:property value="id"/></td>
</tr>
</s:iterator>
</table>
</body>
</html>
跑起来什么都不显示 连<td>里的姓名都不显示。删掉value也不显示 痴肥删掉</s:iterator>
问 是缺jar包吗?配置多次检查应该没问题 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询