老鐵們,幫我看看這兩個問題怎么解決啊
第一個異常:
?Servlet should have a mapping less... (Ctrl+F1)?
Checks if all servlets have mappings
第二個異常:Cannot resolve Servlet 'ListServlet' less... (Ctrl+F1)?
This inspection lets you spot the following problems that might occur in descriptors that are used to deploy your Web Module to a server:
References to the non-instantiable classes
References to the classes that do not extend required class
References to classes with inappropriate scope
Empty tag and attribute values
Tag and attribute values that do not match required pattern (e.g. Java Identifiers)
Tags that do not include required children tags or attributes
Tags that define objects with duplicate names
2018-11-20
你沒有導(dǎo)入你的servlet jar包 在你的tomcat安裝目錄下的lib里面, 要導(dǎo)入servlet.api就可以了
2017-12-25
解決了么?
2017-11-03
第一:我看到你使用maven ?但是你的jar包有沒有在pom.xml中的依賴中搞定;
第二:我看到你的跳轉(zhuǎn)語句好像有問題;
第三:可能是你的約束條件有問題
<web-app version="2.5"?
xmlns="http://java.sun.com/xml/ns/javaee"?
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee?
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app>