過濾器無意間出錯

重裝了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)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章