JSP 移动目录后不能访问, Unable to compile class for

tomxutomxu 2010-03-20 12:27:04
一个奇怪的问题.
程序以前在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文件放在子目录下就不能运行,是何原因呢,有人遇到过吗?
谢谢了.
...全文
64 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
鲜为人知 2010-03-20
  • 打赏
  • 举报
回复
占先了,嘿嘿
fujilin 2010-03-20
  • 打赏
  • 举报
回复
test1.jsp 12行报错了,
把的你的test1文件贴出来,看看
hoojo 2010-03-20
  • 打赏
  • 举报
回复
/web-inf/classes/myapck/aa/test.jsp
那你的访问页面也要更改,aa/test.jsp

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧