JSP 移动目录后不能访问, Unable to compile class for
一个奇怪的问题.
程序以前在TOMCAT5下运行是正常的.
今天下载了 tomcat6.却出问题了.描述如下:
在 tomcat/conf/server.xml 中设置了virtual host
并且设置了context path ,只有一个 / context.
在程序目录中 /test1.jsp 调用类 mypack.Car , mypack.Car位于 /web-inf/classes/myapck 文件夹中.
/test1.jsp是可以正常运行的.
我现在把 /test1.jsp 复制到 /abc/目录下,如: /abc/test1.jsp,访问这个文件,却出现如下错误:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
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: 12 in the jsp file: /test1.jsp
Car cannot be resolved to a type
==============================================
查了好多内容,都没有问题,就是JSP文件放在子目录下就不能运行,是何原因呢,有人遇到过吗?
谢谢了.