| 发表于:2007-02-01 17:48:46 楼主 |
我想做一个留言本,表格中显示用户和发言标题、审核标志(shbz)、发言id(id在数据库是唯一的)点击标题后显示此id的发言内容(用mm_show_id?id=12来实现,12为id标识),shbz为空的(rs.getstring( "shbz "))只显示主题,不提供链接(未经系统员审核的贴只显示标题内容,只有审核后别人才可以查贴的内容),我在单元格填入下内容 <% string bbs; bbs = (rs.getstring( "shbz ")); if( bbs == null) { out.print(rs.getstring( "titles ")); }else{ out.print( " <a href= 'mm_show_id.jsp?id= "+(rs.getstring( "id "))+ " '> "+(rs.getstring( "titles "))+ " </a> "); } %> 结果主页浏览后出了最常见的错误信息 http status 500 - type exception report message description the server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.servletexception: no data found at org.apache.jasper.runtime.pagecontextimpl.handlepageexception(pagecontextimpl.java:498) at org.apache.jsp.index_jsp._jspservice(index_jsp.java:314) at org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:92 我查了数据库的表,没有发现有空值的(除了shbz外),我把上边的句子的titles换成其它字段,结果运行正常,主页有内容出现,但不是显示我所期望的与titles内容相关的.上边的句子我真是看不出有什么问题了.我的数据库为acess的,用tomact4.1,安装了j2dk,主页设计环境为macromedia dreamweaver mx 2004,求助各位高手帮小弟解决. |
|
|
|
|