宝塔用户_dseggk 发表于 2024-2-19 19:10:11

【已完成】404或Only a type can be imported. com.*.*.* resolves to a pac

我的项目部署之后,在jsp中使用<%@ page import="com.example.demo.userDao" %>访问我的java类出现org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: in the generated java file: Only a type can be imported. com.example.demo.userDao resolves to a packageAn error occurred at line: in the jsp file: userDao cannot be resolved to a type而访问HttpServlet或者是springmvc则会出现404:源服务器未能找到目标资源的表示或者是不愿公开一个已经存在的资源表示。但是访问jsp中没有引用到WEB-INF/classes/com/example/demo下的class文件,就没有问题,仿佛使用WEB-INF/classes/com/example/demo下的class文件就会报错,代码应该是对的,因为项目在之前的宝塔中运行是没有问题的

大炮运维V587 发表于 2024-2-20 09:52:13

/www/server/bt_tomcat_web/ip地址/work/Catalina/ip地址/ROOT/org/apache/jsp/poetry/index_jsp.java这个文件的第10行排查下,是不是域名请求不到导致的。

宝塔用户_xdnugr 发表于 2024-8-19 19:31:08

这个问题有下文吗,我现在正在被这个问题困扰

宝塔用户_xdnugr 发表于 2024-8-19 19:31:51

大炮运维V587 发表于 2024-2-20 09:52
这个文件的第10行排查下,是不是域名请求不到导致的。

这个问题有下文吗,我现在正在被这个问题困扰
页: [1]
查看完整版本: 【已完成】404或Only a type can be imported. com.*.*.* resolves to a pac