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工程 ...
随机推荐
- java 字节流和字符流转换类InputStreamReader,OutPutStreamReader
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2pjMjExMzIy/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...
- PhotoSwipe中文API(一)
入门 您应知道之前先做起事情: 1. PhotoSwipe不是一个简单的jQuery插件,至少基本的JavaScript知识才能安装. 2. PhotoSwipe需要预定义的图像尺寸(更多关于这一点) ...
- Selenium IDE脚本录制步骤简介
录制脚本步骤: 1.打开Selenium IDE,输入需要录制脚本的地址,然后启动Firefox,输入selenium IDE需录制的地址,根据实际需求,做相关操作: 2.录制过程中,会发现做的相关操 ...
- http之post和get请求的区别
GET请求 GET /books/?sex=man&name=Professional HTTP/1.1 Host: www.wrox.com User-Agent: Mozilla/5.0 ...
- 为什么要用Zero-Copy机制?
考虑这样一种常用的情形:你需要将静态内容(类似图片.文件)展示给用户.那么这个情形就意味着你需要先将静态内容从磁盘中拷贝出来放到一个内存buf中,然后将这个buf通过socket传输给用户,进而用户或 ...
- C#反射——简单反射操作类的封装
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Re ...
- SQL学习笔记七之MySQL视图、触发器、事务、存储过程、函数
阅读目录 一 视图 二 触发器 三 事务 四 存储过程 五 函数 六 流程控制 一 视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名 ...
- 参考sectools,每个人至少查找5种安全工具、库等信息并深入研究至少两种并写出使用教程
1.Nessus Nessus是免费网络漏洞扫描器,它可以运行于几乎所有的UNIX平台之上.它不仅能永久升级,还免费提供多达11000种插件(但需要注册并接受EULA-acceptance--终端用户 ...
- jvm 内存调整
top查看java占用的内存比较多 top - :: up days, :, user, load average: 0.03, 0.05, 0.05 Tasks: total, running, s ...
- UVa 10791 最小公倍数的最小和(唯一分解定理)
https://vjudge.net/problem/UVA-10791 题意: 输入整数n,求至少两个正整数,使得它们的最小公倍数为n,且这些整数的和最小. 思路: 首先对n进行质因数分解,举个例子 ...