过滤器无意间出错

2024-04-23 12:48
文章标签 过滤器 出错 无意间

本文主要是介绍过滤器无意间出错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

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

这篇关于过滤器无意间出错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/928831

相关文章

BD错误集锦9——查询hive表格时出错:Wrong FS: hdfs://s233/user/../warehouse expected: hdfs://mycluster

集群环境描述:HDFS集群处于HA模式下,同时启动了YARN\JN\KAFKA\ZK。 现象: FAILED: SemanticException Unable to determine if hdfs://s233/user/hive/warehouse/mydb.db/ext_calllogs_in_hbase is encrypted: java.lang.IllegalArgument

Java web项目注册过滤器的两种方式

这篇文章分享一下Java web项目中注册过滤器的两种方式,经常用的是第二种,第一种应该很少人用过吧~   第一步:创建管理器 import javax.servlet.*;import java.io.IOException;/*** @author heyunlin* @version 1.0*/public class GlobalFilter implements Filt

java中的拦截器与过滤器

1 过滤器 主要是应用于servlet,现在都说拦截器。 也就是说servlet的过滤器与SpringMVC拦截器之间的关系与区别 2 你的每一个请求都会先进你写的拦截器在进入你写的方法,不破坏你的业务逻辑  在你的业务之外做一些其他事情 3 在xml中配置的目的是为了找到这个文件(类),这个文件(类)的内容很正常 就是写方法实现自己的业务 198 拦截器:1 还可以用来转码 过

springmvc验证登录用过滤器还是拦截器

https://zhidao.baidu.com/question/650826885570689365.html?qbl=relate_question_0&word=%B9%FD%C2%CB%C6%F7%B5%C7%C2%BD%D1%E9%D6%A4%D3%EB%C0%B9%BD%D8%C6%F7%B5%C7%C2%BD%D1%E9%D6%A4 在struts2中用过filt

vue在script中使用过滤器

在 Vue.js 中,过滤器(filters)主要是用于在模板中格式化文本,它们并不是为了在 <script> 部分或 Vue 组件的 JavaScript 逻辑中使用的。但是,如果你希望在 Vue 组件的 <script> 部分执行类似过滤器的功能,你可以使用方法来达到这个目的。 以下是一个示例,展示如何在 Vue 组件的 <script> 部分创建一个方法,这个方法可以模拟过滤器的功能:

Elasticsearch过滤器(Filter):原理及使用

Hi~!这里是奋斗的小羊,很荣幸您能阅读我的文章,诚请评论指点,欢迎欢迎 ~~ 💥💥个人主页:奋斗的小羊 💥💥所属专栏:C语言 🚀本系列文章为个人学习笔记,在这里撰写成文一为巩固知识,二为展示我的学习过程及理解。文笔、排版拙劣,望见谅。 目录 Elasticsearch过滤器(Filter):原理及使用过滤器的原理过滤器的使用总结 Elasti

Python 安装MySQL模块出错

http://san-yun.iteye.com/blog/2106336 google找到答案(http://stackoverflow.com/questions/13044201/install-mysql-python-return-error-in-centos),需要先安装mysql-devel.x86_64,通过 sudo yum install mysql-devel.x86_

Elasticsearch中的post_filter后置过滤器技术

Hi~!这里是奋斗的小羊,很荣幸您能阅读我的文章,诚请评论指点,欢迎欢迎 ~~ 💥💥个人主页:奋斗的小羊 💥💥所属专栏:C语言 🚀本系列文章为个人学习笔记,在这里撰写成文一为巩固知识,二为展示我的学习过程及理解。文笔、排版拙劣,望见谅。 目录 Elasticsearch中的post_filter后置过滤器技术作用和优势使用示例总结 Elasti

使用OneWorld创建分公司出错,提示Subsidiary数量超出限制

在公司OneWorld账号中创建了一个美国公司,但是报错了。 一般来说一个OneWorld账号中可以创建125个subsidiary(包含Parent Company),这里还没有超出限制呢。 后来了解到一个OneWorld只能创建一个国家的Subsidiary。如果要创建其它国家或地区的Subsidiary,需要购买相应国家的OneWorld版本。 可以从系统中的Bill Informatio

TOMCAT出错

An internal error occurred during: "Launching MISS on MyEclipse Tomcat 7". Cannot change deployment state from ERROR to REDEPLOYING.  用的是Myeclipse。 ----解决思路---------------------- 右击“项目名” –> MyEcl