您的位置:首页 > 其它

Only a type can be imported. resolves to a package

2009-08-25 09:25 513 查看
org.apache.jasper.JasperException: Unable to compile class for JSP:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 7 in the generated java file
Only a type can be imported. thamxpS.LS_S_USER resolves to a package

An error occurred at line: 8 in the generated java file
Only a type can be imported. thamxpS.LS_S_USER resolves to a package

An error occurred at line: 9 in the generated java file
Only a type can be imported. thamxpS.pubfunction resolves to a package

所报错误为:两个类被当成了包名,而不被jsp引擎认为是类,故在页面中使用这些类,不会被识别

尝试一:在tomcat的work的相关目录下没有编译成功的该jsp的编译文件,但是从别的地方拷贝过来的话,一旦访问该jsp

文件就会被tomcat自动清除掉了,无奈。。。

尝试二:把类名改成包名的话还是在jsp中不能引用到类

尝试三:最后只能硬着头皮从头到尾查看代码了,结果发现是应用发布的时候的报名错了,thamxpS.pubfunction 和thamxpS.LS_S_USER 的包名在classes文件夹下都成了thamxps.LS_S_USER ,一个字母之差啊,居然花了我一天的时间,

不过包名为什么在发布的时候又被改了呢,源码里面还是thamxpS.LS_S_USER 大写的S啊?,这就不好说了,应用时后期才接手的,

现在终于知道粗心要付出的代价了

真汗。。。 。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: