The type javax.servlet.ServletContext cannot be resolved.It is indirectly referenced from required挣个项目中如果这个问题解决了 其它包里又出现相同的错误 这是为什么呢

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 06:53:09
The type javax.servlet.ServletContext cannot be resolved.It is indirectly referenced from required挣个项目中如果这个问题解决了 其它包里又出现相同的错误 这是为什么呢

The type javax.servlet.ServletContext cannot be resolved.It is indirectly referenced from required挣个项目中如果这个问题解决了 其它包里又出现相同的错误 这是为什么呢
The type javax.servlet.ServletContext cannot be resolved.It is indirectly referenced from required
挣个项目中如果这个问题解决了 其它包里又出现相同的错误 这是为什么呢

The type javax.servlet.ServletContext cannot be resolved.It is indirectly referenced from required挣个项目中如果这个问题解决了 其它包里又出现相同的错误 这是为什么呢
有时候用eclipse导入一个外来的工程时会出现以上错误,这主要是因为你的电脑上安装了多个版本的jdk,解决的办法是:右击工程目录下的jdk 选择 build path---->config build path 或者在eclipse菜单栏点击project----->propertys 在里面再选择Java Build Path -----> Libraries---->Add Libraries----->JRE System Library

把tomcat/lib目录中的jsp-api.jar或者servlet-api.jar(记不清了)导入到项目的web/lib目录下试试