WEB项目之前按教程写的时候是一切正常的,后来不知道怎么回事,这个UploadServlet就消失了,中间不小心把库给删掉一次,后来又添加回来了。重写UploadServlet时候就在 导包那里就报错,,,jar包这些都在
严重: 分配异常的servlet [UploadServlet]
java.lang.Error: Unresolved compilation problems:
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files
The method parseRequest(HttpServletRequest) from the type ServletFileUpload refers to the missing type HttpServletRequest
FileOutputStream cannot be resolved to a type
at com.itheima.upload.UploadServlet.<init>(UploadServlet.java:1)
刚上传我刚好找到原因了,把库给删了,,,重新添加回来,对比别的项目库的位置,应该是JAVASE16 在Modulepath里
剩下的一个服务器,EAR libraries ,一个Web App Libraries 在 Classpath 变量里
我把EAR libraries Web App Libraries 搞回变量这一栏 就不报错了!能正常运行,不过还是谢谢大佬!差点又浪费你们时间,