JSP Unable to compile class for JSP
今天刚弄好MyEclipse环境,试了一下jsp的创建,然后就出现了一个很令人纠结的问题。
文档目录如下:

Jsp代码如下:
<%@page import="com.pd.Person"%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
Student stu=new Student();//使用默认的包,这个会出错
Person p=new Person(); //导入了包,没有问题
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
</html>
出错信息如下:
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 4 in the jsp file: /test.jsp
Student cannot be resolved to a type
1: <%@page import="com.pd.Person"%>
2: <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
3: <%
4: Student stu=new Student();//使用默认的包,这个会出错
5: Person p=new Person(); //导入了包,没有问题
6: %>
7: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
很纠结的问题,使用默认包的类会提示这个错误。
JSP Unable to compile class for JSP的更多相关文章
- JSP连接数据库,报Unable to compile class for JSP
先看一下报错原因: HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to ...
- org.apache.jasper.JasperException: Unable to compile class for JSP
项目启动时报错 : The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory S ...
- jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP
HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to compile ...
- Count:858org.apache.jasper.JasperException: Unable to compile class for JSP
1.错误描述 Count:858org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurre ...
- 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 ...
- tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案【原创】
问题描述: tomcat启动后,console正常,console中语句为: 信息: Server startup in 7291 ms 但浏览器访问首页面http://localhost:808 ...
- JAVA Drp项目实战—— Unable to compile class for JSP 一波三折
交代下背景.电脑系统是64位的,用的是64位的Tomcat.安装是32位的Myeclipse10,java环境也是32位的.Tomcat在開始启动时会报这样一个错误,"Can't load ...
- tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案
转:tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案 检查tomcat与web工程对应版本,tomcat中对应版本的jar包拷贝到web工程 ...
随机推荐
- centos7上安装php5.6
配置yum源 追加CentOS 6.5的epel及remi源. # rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel- ...
- centos6 pip install python-ldap报错
error: Setup script exited with error: command 'gcc' failed with exit status 1 解决方法: 原因是版本不兼容,centos ...
- java第四天
p32~p36: 学习javadoc 1.第一步,打开一个一定规模的java项目 2.第二步,搭建测试环境 IntelliJ IDEA ——> Tools ——> Generate Jav ...
- 一次频繁Full GC问题排查过程分享
问题描述 应用收到频繁Full GC告警 问题排查 登录到对应机器上去,查看GC日志,发现YGC一分钟已经达到了15次,比Full GC还要频繁一些,其中Full GC平均10分钟超过了4次,如下图 ...
- Java之网络爬虫WebCollector2.1.2+selenium2.44+phantomjs2.1.1
Java之网络爬虫WebCollector2.1.2+selenium2.44+phantomjs2.1.1 一.简介 版本匹配: WebCollector2.12 + selenium2.44.0 ...
- Windows Server 2008 R2 web服务器发布在线系统时遇到的问题
1 HTTP 错误 404.2 - Not Found,由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面(如下图) 打开 Internet 信息服务(IIS) ...
- 20145301《网络对抗》Exp2 后门原理与实践
20145301<网络对抗>Exp2 后门原理与实践 基础问题回答 例举你能想到的一个后门进入到你系统中的可能方式? 系统或者某些软件自身留下的后门. 钓鱼网站等非正规网站上捆绑下载 例举 ...
- MS08_067漏洞渗透攻击
MS08_067漏洞渗透攻击实践 前期准备 kali和winxp要ping通 kali开启msfconsole: 同时在这里可以看到目前可攻击载荷个数一共是471个,也可以看到其他攻击的数量如图. 用 ...
- 20145326《Java程序设计》第一周学习总结
20145326<Java程序设计>第一周学习总结 教材学习内容总结 转眼间新的一学期终于开始了!为什么我这么期待呢?因为这学期可以上娄嘉鹏老师的java程序设计课,我不是什么电脑天才,之 ...
- Zynq-Linux移植学习笔记之十-u-boot网络配置
在zynq开发板zc706上,网络通路由下面三个设备组成: 其中zynq负责对phy进行配置,当zynq上的网络控制器以及phy完成正确配置时,能够看到RJ45上面的黄灯亮,此时表明链路已经通了.如果 ...