| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 912 人关注过本帖
标题:我的程序哪里错了??
只看楼主 加入收藏
Javapet
Rank: 1
等 级:禁止访问
帖 子:80
专家分:0
注 册:2008-1-5
结帖率:50%
收藏
 问题点数:0 回复次数:1 
我的程序哪里错了??
错误信息:
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>
搜索更多相关主题的帖子: 信息 localhost Software occurred 
2008-03-13 00:12
带头大哥
Rank: 1
等 级:新手上路
帖 子:39
专家分:0
注 册:2008-3-2
收藏
得分:0 
错误信息写的请请楚楚啊
2008-03-13 00:53
快速回复:我的程序哪里错了??
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.070475 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved