解决IDEA找不到javax.servlet.jar包的问题

解决IDEA找不到javax.servlet.jar包的问题

配置完tomcat,准备照着资料实现Servlet接口,发现IDEA中并不能找到javax.servlet.jar包,一番查找之后,解决了问题,解决方法如下:

一、右键点击项目,选择Open Module Settings

在这里插入图片描述

二、选择Libraries,点击加号+,选择Java

在这里插入图片描述

三、浏览目录,找到tomcat安装目录下的lib里的servlet-api.jar包,点击ok。

在这里插入图片描述

四、最后选择项目即可。

在这里插入图片描述

Files contained in javax.servlet.jar: META-INF/MANIFEST.MF javax/servlet/http/LocalStrings.properties javax.servlet.http.HttpSessionBindingListener.class javax.servlet.http.HttpSessionBindingEvent.class javax.servlet.http.HttpSessionEvent.class javax.servlet.http.HttpSession.class javax.servlet.http.HttpSessionContext.class javax.servlet.http.Cookie.class javax.servlet.http.HttpSessionAttributeListener.class javax.servlet.http.HttpServlet.class javax.servlet.http.HttpServletRequest.class javax.servlet.http.HttpServletResponse.class javax.servlet.http.NoBodyResponse.class javax.servlet.http.NoBodyOutputStream.class javax.servlet.http.HttpServletRequestWrapper.class javax.servlet.http.HttpSessionActivationListener.class javax.servlet.http.HttpSessionListener.class javax.servlet.http.HttpUtils.class javax.servlet.http.HttpServletResponseWrapper.class javax/servlet/resources/web-app_2_2.dtd javax/servlet/resources/j2ee_1_4.xsd javax/servlet/resources/j2ee_web_services_client_1_1.xsd javax/servlet/resources/j2ee_web_services_1_1.xsd javax/servlet/resources/XMLSchema.dtd javax/servlet/resources/jsp_2_0.xsd javax/servlet/resources/javaee_web_services_client_1_2.xsd javax/servlet/resources/datatypes.dtd javax/servlet/resources/web-app_2_3.dtd javax/servlet/resources/jsp_2_1.xsd javax/servlet/resources/web-app_2_4.xsd javax/servlet/resources/javaee_5.xsd javax/servlet/resources/web-app_2_5.xsd javax/servlet/resources/xml.xsd javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd javax/servlet/jsp/resources/jspxml.dtd javax/servlet/jsp/resources/jsp_2_0.xsd javax/servlet/jsp/resources/jsp_2_1.xsd javax/servlet/jsp/resources/jspxml.xsd javax/servlet/LocalStrings.properties javax.servlet.ServletContextAttributeListener.class javax.servlet.ServletContextAttributeEvent.class javax.servlet.ServletContextEvent.class javax.servlet.ServletContext.class javax.servlet.RequestDispatcher.class javax.servlet.Servlet.class javax.servlet.ServletException.class javax.servlet.ServletRequest.class javax.servlet.ServletResponse.class javax.servlet.ServletConfig.class javax.servlet.ServletInputStream.class javax.servlet.ServletOutputStream.class javax.servlet.FilterChain.class javax.servlet.ServletRequestEvent.class javax.servlet.Filter.class javax.servlet.FilterConfig.class javax.servlet.ServletRequestAttributeListener.class javax.servlet.ServletRequestAttributeEvent.class javax.servlet.GenericServlet.class javax.servlet.SingleThreadModel.class javax.servlet.ServletRequestWrapper.class javax.servlet.ServletResponseWrapper.class javax.servlet.ServletRequestListener.class javax.servlet.UnavailableException.class javax.servlet.ServletContextListener.class META-INF/maven/org.mortbay.jetty/servlet-api-2.5/pom.xml META-INF/maven/org.mortbay.jetty/servlet-api-2.5/pom.properties
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值