Don’t panic in case of data tilt, teach you to easily obtain the slope of table tilt>>>
1、 When creating a servlet, write the following statement:
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
You will be prompted that the package javax. Servlet and the package javax. Servlet. HTTP do not exist
2, because the java compiler did not find the package javax. Servlet
3. The solution: copy the servlet-api.jar in the Lib directory of Tomcat installation package to the Lib sub file in the WEB-INF directory of the project folder, namely Web – > WEB-INF–lib.
4. After joining, remember that the methods of buildpath, eclipse and idea are different
Eclipse, select the corresponding jar package and right-click – > buildpath-> add to build path
Idea reference: http://www.cnblogs.com/miller-zou/p/5495168.html
Similar Posts:
- The following table: unable to import javax. Servlet. HttpServletRequest
- HTTP status 404 error during eclipse + Tomcat connection test
- The solution of the import javax.servlet cannot be resolved in Java
- HTTP Status 500 – Unable to compile class for JSP settlement program
- Using idea and maven, there is an error: (4, 21) Java: there is no problem with the package javax.servlet
- Tomcat10 Error: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
- Define IntelliJ “initialization failed school” https://start.spring.io Do sth
- [Solved] IDEA: JSP Could Not Use session Build-in Object
- ImportError: No module named pil
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path