过滤器无意间出错

重装了MyEclipse6.0.1之后、打开原来的工程目录、在启动Tomcat6.0的时候总是出现莫名其妙的提示:
javax.servlet.Filter 无法编译
重新引入J2EE包也不行、最后没有办法、重写了一个过滤器、但里面完全跟原来的过滤器一模一样、在web.xml引入新的过滤器之后就不会再提示错误了。
不知道怎么回事、删除原来的过滤器、但想把这些错误的信息记录下来、撤销删除操作、在web.xml中引入原来的过滤器、这时这个类又恢复正常了。。。。。。

 

严重: Servlet.service() for servlet action threw exception
java.lang.Error: Unresolved compilation problems:
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpServletResponse cannot be resolved
The import javax.servlet.http.HttpSession cannot be resolved
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpSession cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpSession cannot be resolved to a type
at com.lt.hr.action.LoginAction.<init>(LoginAction.java:7)

 

java.lang.Error: Unresolved compilation problems:
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpServletResponse cannot be resolved
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
com.lt.cage.action.JunketPromoterAction.<init>(JunketPromoterAction.java:11)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:506)
java.lang.Class.newInstance0(Class.java:355)
java.lang.Class.newInstance(Class.java:308)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.lt.cage.filters.EncodingFilter.doFilter(EncodingFilter.java:23)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值