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工程 ...
随机推荐
- (转) SpringBoot非官方教程 | 第一篇:构建第一个SpringBoot工程
简介 spring boot 它的设计目的就是为例简化开发,开启了各种自动装配,你不想写各种配置文件,引入相关的依赖就能迅速搭建起一个web工程.它采用的是建立生产就绪的应用程序观点,优先于配置的惯例 ...
- PAT 1135 Is It A Red-Black Tree[难]
1135 Is It A Red-Black Tree (30 分) There is a kind of balanced binary search tree named red-black tr ...
- 手把手教你学node.js之一个简单的express应用
一个简单的express应用 目标 建立一个 lesson1 项目,在其中编写代码.当在浏览器中访问 http://localhost:3000/ 时,输出 Hello World. 挑战 访问 ht ...
- mysql数据库权限
use mysql select * from user \G; UPDATE user set password=PASSWORD('root') where user='root' grant a ...
- cas php
CAS的php客户端实践—单点登录整合php程序 兄弟近日尝试将一个php程序以单点登录方式和原有的系统整合在一起.验证服务器选用的是CAS,其提供有相应的php客户端.整个过程如下:1.搭建CAS服 ...
- SpringMVC—概述
mvc容器的实例化: http://blog.csdn.net/lin_shi_cheng/article/details/50686876 Spring的启动过程: 1: 对于一个web应用,其部署 ...
- 2017ACM/ICPC Guangxi Invitational Solution
A: A Math Problem 题意:给出一个n,找出有多少个k满足kk <= n 思路: kk的增长很快,当k == 16 的时候就已经超过1e18 了,对于每一次询问,暴力一下就可以 ...
- Python3.x:os.chdir(改变当前路径方法)介绍
Python3.x:os.chdir(改变当前路径方法)介绍 1,os.chdir() import os os.chdir(r'C:\python36\test_chdir') 说明:chdir() ...
- img = img1*mask + img2*(1-mask) How do that ?
原文地址:http://answers.opencv.org/question/160599/img-img1mask-img21-mask-how-do-that/ 如何提高一个简单操作的速度?最后 ...
- IMX6Q GPIO定义
ret = gpio_request_array(mx6q_sabresd_flexcan_gpios, ARRAY_SIZE(mx6q_sabresd_ ...