我的程序哪里错了??
错误信息:org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 45 in the jsp file: /list_notes.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test\org\apache\jsp\list_005fnotes_jsp.java:108: "else" 不带有 "if"
else
^
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test\org\apache\jsp\list_005fnotes_jsp.java:138: "catch" 不带有 "try"
} catch (Throwable t) {
^
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test\org\apache\jsp\list_005fnotes_jsp.java:37: "try" 不带有 "catch" 或 "finally"
try {
^
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\test\org\apache\jsp\list_005fnotes_jsp.java:150: 需要 '}'
^
4 错误
<%@ page contentType="text/html;charset=GB2312"%>
<%@ page import="Factory.*"%>
<%@ page import="java.util.*"%>
<jsp:useBean id="all" class="lists.lists"/>
<html>
<body>
<center>
<%!
List box=null;
String str=null;
lists L=null;
%>
<%
str=(String)session.getAttribute("name");
if(str!=null)
{
%>
<form>
<h1>留言板</h1>
<table width=85%>
<tr><td align="right"><a href="insert.jsp"><font color="blue" size=3>添加新留言</font></a></tr>
</table>
<table border=1 bordercolor="green" cellspacing=0 width=85%>
<tr>
<td align="center">标题</td>
<td align="center">作者</td>
<td align="center">内容</td>
<td align="center">删除</td></tr>
<%
box=Factory.getListDAOImpl().queryAll(all);
if(box!=null)
{
Iterator it=box.iterator();
while(it.hasNext())
{
L=(lists)it.next();
%>
<tr>
<td align="center"><%=L.getTitle()%></td>
<td align="center"><%=L.getAuthor()%></td>
<td align="center"><%=L.getContent()%></td>
<td align="center"><a href="delete_do.jsp">删除</a></td></tr>
}
<%
}
else
{
%>
<tr>
<td colspan=4 align="center">没有任何留言内容!!</td></tr>
<%
}
%>
</table>
</form>
<%
}
else
{
response.setHeader("refresh","5;url=login.jsp");
%>
<font size=5>你还没有登陆,请先登陆!!
<br>
5秒后自动跳转到登陆页<br>
如果没有跳转,请按<a href="login.jsp">这里</a></font>
<%
}
%>
</center>
</body>
</html>