The type javax.servlet.http.HttpServletResponse cannot be resolved. It is indirectly referenced from required .class files

时间:2022-05-03 03:36:36

The type javax.servlet.http.HttpServletResponse cannot be resolved. It is indirectly referenced from required .class files

翻译:无法解析javax.servlet.http.HttpServletResponse类型。 它是从所需的.class文件间接引用的

https://blog.csdn.net/smartzhaomin/article/details/19487907该网址解决了

是缺少serverlet的引用库,解决如下
1.工程右键-properties->java build path
2.在java build path的libraries tab页中选择Add external Jars...按钮
3. 选择eclipse的安装目录,我的是绿色版本,我本机的路径如下,你自己需要根据自己的路径查找添加。E:\eclipse-java-indigo-SR1-win32\eclipse\plugins 选择javax.servlet.jsp_2.0.0.v201101211617.jar;javax.servlet_2.5.0.v201103041518.jar 进行添加即可
注释:由于版本不同,文件包名可能稍有区别。
---------------------
作者:smartzhaomin
来源:CSDN