无法在JSP页面显示内容,求大神指点!!!
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.util.*,com.myEdition.bean.*" %>
<html>
<head>
<title>内网首页</title>
<style type="text/css">
<!--
.style1{
color:#FF0000;
font-weight:bold;
}
-->
</style>
</head>
<% List contentTypes = (List)request.getAttribute("contentTypes");
Map contents = (Map) request.getAttribute("contents");
%>
<body>
<!-- 按照类别显示内容 -->
<div align="center" class="style1" style='float:left;width:100%;height:10%;border:1px solid #BA5B57;'>内网首页</div>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<%
for(int i = 0;contentTypes !=null &&i<contentTypes.size()-1;i++){
%>
<tr>
<td height="20">
<strong><%=((ContentType)contentTypes.get(i)).getName()%></strong>
</td>
<td>
<strong><%=((ContentType)contentTypes.get(i+1)).getName()%></strong>
</td>
</tr>
<tr>
<td height="350">
<ol>
<%
List contentsList = (List)contents.get((((ContentType)contentTypes.get(i)).getId()));
for (int j = 0;contentsList !=null&&j< contentsList.size();j++){
%>
<li><%=((Content) contentsList.get(j)).getTitle()%></li><%} %>
</ol>
</td>
<td>
<ol>
<% contentsList = (List)contents.get((((ContentType)contentTypes.get(i+1)).getId()));
for(int j=0;contentsList !=null&&j<contentsList.size();j++){
%>
<li><%=((Content) contentsList.get(j)).getTitle()%></li>
<% }%>
<%
}
%>
</ol>
</td>
</tr>
<tr style="border-top-width:0">
<td height="15" style="border-top-width:0">
<div style='width:100%;border:1px solid red;' align='right'>
<a href="index.action">更多内容</a>
</div>
</td>
<td style="border-top-width:0">
<div style='width:100%;border:1px solid red;' align='right'>
<a href="index.action">更多内容</a>
</div>
</td>
</tr>
</table>
</body>
</html>
----------------------------------------------------------------------------------------
这几行为何无法在页面输出内容??
<td height="350">
<ol>
<%
List contentsList = (List)contents.get((((ContentType)contentTypes.get(i)).getId()));
for (int j = 0;contentsList !=null&&j< contentsList.size();j++){
%>
<li><%=((Content) contentsList.get(j)).getTitle()%></li><%} %>
</ol>
</td>
<td>
<ol>
<% contentsList = (List)contents.get((((ContentType)contentTypes.get(i+1)).getId()));
for(int j=0;contentsList !=null&&j<contentsList.size();j++){
%>
<li><%=((Content) contentsList.get(j)).getTitle()%></li>
<% }%>
<%
}
%>
</ol>
</td>
</tr>
我验证了,都不为空,但是为何不输出呢?