为了账号安全,请及时绑定邮箱和手机立即绑定

jsp项目本地可用,云服务不可以用

jsp项目本地可用,云服务不可以用

当年话下 2019-02-19 21:21:32
用idea写的jsp,然后导出war包,本地(tomcat 9.0,jdk 1.8)项目可用,部署到服务器(tomcat 8.5 jdk 1,7)就出错了错误代码 Exception report message An exception occurred processing JSP page /index.jsp at line 95 description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 95 92: <div class="shoes"> 93: <div class="container"> 94: <% 95: Vector<Car> cars = new Dao().getCar(); 96: int k=1; 97: out.print(" <div class=\"product-one\">\n"); 98: for(Car car:cars){ Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause javax.servlet.ServletException: java.lang.UnsupportedClassVersionError: com/Dao/Dao org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838) org.apache.jsp.index_jsp._jspService(index_jsp.java:292) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause java.lang.UnsupportedClassVersionError: com/Dao/Dao org.apache.jsp.index_jsp._jspService(index_jsp.java:209) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
查看完整描述

3 回答

?
富国沪深

TA贡献1790条经验 获得超9个赞

java.lang.UnsupportedClassVersionError: com/Dao/Dao
这句在提示类版本号错误,是个致命的Error
试试本地用jdk1.7编译打包再上传,开发环境和部署环境不一致还是比较忌讳的

查看完整回答
反对 回复 2019-03-01
?
白衣染霜花

TA贡献1796条经验 获得超10个赞

统一环境。

查看完整回答
反对 回复 2019-03-01
?
哔哔one

TA贡献1854条经验 获得超8个赞

就是因为本机和服务器的JDK版本不一致

查看完整回答
反对 回复 2019-03-01
  • 3 回答
  • 0 关注
  • 384 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信