JSP连接数据库,报Unable to compile class for JSP
先看一下报错原因:
HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to compile class for JSP: description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [16] in the generated java file: [F:\apache-tomcat-7.0.70\work\Catalina\localhost\LibrarySystem\org\apache\jsp\frameOne_jsp.java]
Only a type can be imported. com.mysql.jdbc.Driver resolves to a package Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.70 logs.
Apache Tomcat/7.0.70
然后我的解决办法是:因为我使用的MyEclipse编译器是32位,里面自带的是32位的JDK1.6版本,而我的电脑是64位的WIN10系统,安装的是64位的Tomcat7.0,结果在Tomcat中部署时,出现了上面的错误。随后,我下载安装配置了一个32位的Tomcat7.0,结果问题顺利解决~
(PS:当时我是参照这一篇博客而解决了问题,具体链接地址如下:http://blog.csdn.net/zwk626542417/article/details/38421839)
JSP连接数据库,报Unable to compile class for JSP的更多相关文章
- maven web报错:org.apache.jasper.JasperException: Unable to compile class for JSP
原博文地址:https://blog.csdn.net/ken1583096683/article/details/80837281 maven web项目启动没问题,访问页面就报错:org.apac ...
- 【JSP报错】—— org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [52] ...
- Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Unable to compile class for JSP] with root cause java.lang.IllegalArgumentException: Page directive: inval
严重: Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Una ...
- Unable to compile class for JSP
https://www.cnblogs.com/mthoutai/p/7136304.html 错误提示: The return type is incompatible with JspSource ...
- JAVA Drp项目实战—— Unable to compile class for JSP 一波三折
交代下背景.电脑系统是64位的,用的是64位的Tomcat.安装是32位的Myeclipse10,java环境也是32位的.Tomcat在開始启动时会报这样一个错误,"Can't load ...
- embedded tomcat运行java web,Unable to compile class for JSP
环境 eclipse:4.5.2 jre:1.8 java project compiler:1.8 embedded tomcat:7.0.32 可以正常启动,但是访问时,会报错. HTTP Sta ...
- Jetty - Unable to compile class for JSP
问题与分析 在启动公司项目时发现报错如下: [jetty] 2019-10-07 10:28:28.760:WARN:org.apache.jasper.compiler.Compiler:Error ...
- UniEAP Platform V5.0 Unable to compile class for JSP
流程设计器报错: http://127.0.0.1:8080/framework/workflow/webdesign/procmodify/procmodifydetail.jsp?isLoadDa ...
- org.apache.jasper.JasperException: Unable to compile class for JSP
项目启动时报错 : The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory S ...
随机推荐
- input框中的name和id的区别
1. 可以说几乎每个做过Web开发的人都问过,到底元素的ID和Name有什么区别阿?为什么有了ID还要有Name呢?! 而同样我们也可以得到最classical的答案:ID就像是一个人的身份证号码,而 ...
- ubuntu中LAMP环境搭建及ubuntu语言和输入法设置
1. LAMP 的安装 1) sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql 2) 存放 ...
- 【HTML5&CSS3进阶学习01】气泡组件的实现
前言 气泡组件在实际工作中非常普遍,无论是网页中还是app中,比如: 我们这里所谓气泡组件是指列表型气泡组件,这里就其dom实现,css实现,js实现做一个讨论,最后对一些细节点做一些说明,希望对各位 ...
- Css动画总结
transform: transition: animation:
- 阻止默认事件event.preventDefault();
阻止浏览器默认事件.什么是默认事件,例如浏览器默认右键菜单.a标签默认连接跳转...,如何阻止呢? Firefox中,event必须作为参数传入. IE中,event是window对象的属性. ev ...
- 关于ArcGIS的Web 3D GIS问答
以下问答基于ArcGIS 10.4版本,涉及的软件有 ArcGIS for Server ArcGIS for Desktop ArcGIS Pro 1.3 Esri Drone2Map 1 支持B/ ...
- 架构验证过程发现非数据类型错误 validation found non-data type errors
问题: infopath报一下错误 validation found non-data type errors 架构验证过程发现非数据类型错误 原因: 重复表字段在后台代码里要一一对应,否则报错. 错 ...
- GitHub学习心得之 分支操作
目录 前言 1. 一般的push和pull 2. 分支操作 前言 本文对Github的分支操作进行了总结, 主要基于以下文章: http://blog.csdn.net/guang11cheng/ar ...
- Emacs学习心得之 LaTeX编辑
目录 1. 前言 2. texlive的安装 3. AUCTEX的安装和配置 4. RefTEX的安装和配置 一.前言 本篇博文记录了Emacs下LaTeX编辑环境的搭建,参考一下文章: http:/ ...
- 升级Xcode8、iOS10问题记录
1.webView的代理方法: 升级前: - (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)e ...