Maven cannot create a servlet
Solution
Scheme I
Specify the root directory in the IML of the project
<sourceRoots> <root url="file://$MODULE_DIR$/src/main/java" /> </sourceRoots>
Scheme II
Successfully solved
Error when Maven creates Servlet
Solution
Add in pom.xml (add dependencies under dependencies)
<!-- JSTL --> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!-- Servlet --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <!--JSP --> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency>
Successfully resolved
Similar Posts:
- Springboot always reports an error when importing JSP dependencies
- [Solved] IDEA: JSP Could Not Use session Build-in Object
- Error during artifact deployment. See server log f
- Can not find the tag library descriptor for “http://java.sun.com/jstl/core”
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config [How to Solve]
- HTTP Status 500 – Unable to compile class for JSP settlement program
- [Solved] java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUni
- Springboot startup error start bean ‘eurekaautoserviceregistration’ NullPointerException
- Tomcat10 Error: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener