Struts1.3+spring2.5+hibernate3.2部署tomcat6.0.18报错请教

Struts1.3+spring2.5+hibernate3.2部署在tomcat6.0.18虽然成功,但是对数据库的查询回报错。
添加修改都能成功。在Myeclipse6.5里运行项目完全没有问题。但是部署到tomcat6.0.18里,查询就报错。

郁闷了很久了。希望得到帮助。

---------------------------------错误信息--------------------------------

2009-6-24 17:45:02 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2009-6-24 17:45:41 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: javax/servlet/jsp/tagext/Tag
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
 at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
2009-6-24 17:45:41 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet action threw exception
javax.servlet.ServletException: javax/servlet/jsp/tagext/Tag
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
 at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)

-------------------------------------------------------------------------------------------------------------------------

 

先谢谢啦!

 

----------------------------------------------------------------------------------------

以我的推测应该是tomcat没有识别出页面标签,也许问题出在servlet-api.jar,或jsp-api.jar上。

但是如果把这两个jar加到项目的lib目录里是报错的,貌似环境变量里配也试过了,tomcat的高版本6.0.20和低版本5.5也试过了,都不好使。

 

 


问题补充:
先感谢lovewhzlq的回复,您说的servlet版本低指的是哪里的低,tomcat lib里的,还是说我项目里的jar包版本低。我项目里没有servlet的jar包,因为tomcat都有提供。在myeclipse6.5里运行一点问题都没有。但不知为什么拿出来运行,查询就报错,现在我推断很有可能是就是页面标签的问题。我下面贴上来一个查询后分页的页面。大家再帮忙看看哪里的标签有问题?

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
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>河北大学综合新闻网</title>
  </head>
  <body>
    <center>
<h3>
回收站
</h3>
<table border="2" width="600">
<tr>
<td>
标题
</td>
<td>
发布时间
</td>
<td>
状态
</td>
<td>
操作
</td>
</tr>
<c:forEach items="${requestScope['messageList']}" var="message">
<tr>
<td>
<c:out value="${message.title}" />
</td>
<td>
<c:out value="${message.addTime}" />
</td>
<td>
<c:if test="${1==message.isPost}">
已审核通过
</c:if>
<c:if test="${0==message.isPost}">
未审核
</c:if>
</td>
<td>
<a href="./getMessage.do?id=<c:out value="${message.id}"/>">查看详细</a>&nbsp;&nbsp;
<a href="./setNoDelMessage.do?id=<c:out value="${message.id}"/>"
onclick="javascript:return confirm('您要还原这条信息吗?')">还原</a>&nbsp;&nbsp;
<a href="./deleteMessage.do?id=<c:out value="${message.id}"/>"
onclick="javascript:return confirm('您要删除这条信息吗?')">删除</a>
</td>
<tr>
</c:forEach>
</table>
<table align="center" width="500">
    <tr>
       <td align="center" colspan="10">
           每页<bean:write name="messagePage" property="pageSize"/>条记录
           共<bean:write name="messagePage" property="rowCount"/>条记录
           当前第(<bean:write name="messagePage" property="currentPage"/>/<bean:write name="messagePage" property="totalPage"/>)页
          <logic:present name="messagePage">
            <html:link page="/listRecycle.do?pno=1">首页</html:link>
          <logic:equal name="messagePage" property="hasPreviousPage" value="false">上一页</logic:equal>
          <logic:equal name="messagePage" property="hasPreviousPage" value="true">
           <a href="./listRecycle.do?pno=<bean:write name="messagePage" property="prePage"/>">上一页</a>
      </logic:equal>
          
        <logic:equal name="messagePage" property="hasNextPage" value="false">下一页</logic:equal>
        <logic:equal name="messagePage" property="hasNextPage" value="true">
         <a href="./listRecycle.do?pno=<bean:write name="adminPage" property="nextPage"/>">下一页</a>
        </logic:equal>
           <a href="./listRecycle.do?pno=<bean:write name='messagePage' property='totalPage'/>">末页</a>
        </logic:present>
      </td>
      </tr>
    </table>
</center>
  </body>
</html>

问题补充:
-----------------------
我工程里的lib下包含了jstl-1.2.jar,standard-1.0.6.jar。会不会是jstl版本低了?
问题补充:
我换了您说的1.1和1.0但是还是一直有问题一样的错,不过错误已经确定就是出在jstl上。因为我换成struts1标签展示信息没有问题,一用jstl就报错。
您可否给点您使用jstl的建议或者您配置jstl时候导入的jar版本和tld文件,以及需要注意什么,谢谢。
问题补充:
重新导入了一次jstl,用的1.1版本,还是存在问题。tomcat里也安了jstl,而且版本一致,tld也在web.xml里配了,不过还是报最早的错。哎~~我还是用struts标签吧。谢谢您的答复。给分。

4个回答

你应该是用Myeclipse的加入jstl库的功能吧,

jstl的版本对应的jar和tld文件,最好自己保存一份,这样每次还是自己手动加上,

Myeclipse的加入jstl库最好是选择1.1或1.0的版本,就应该没什么问题

先把项目中的jstl相关的东西全部去掉,再重新导入一次吧,

javax.servlet.ServletException: javax/servlet/jsp/tagext/Tag
我怀疑是不是servlet的版本太低还是怎么,
要不就是标签有问题了

你这引用<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

你的web应用lib目录里有没jstl.jar啊,去确定下

jstl-1.2.jar这个版本太高了,

换成1.0或1.1的

1.2的有些问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问