1. Error in adding Maven project in idea: Java: package javax Servlet does not exist. As shown in the figure:
2. Solution
1. In file — > Project Structure –> Make changes in modules
2. Select dependencies in modules and click + — > Jars or directories to add
3. Select the local Tomcat installation path, go to the lib folder and select: jsp-api.jar and servlet-ap.jar, then click OK, we can see two more packages, click Apply OK, the following figure.
4. Redeploy the project to run successfully.
Read More:
- Idea create Maven project Error: [error] no longer supports source option 1.5. Please use version 1.6 or higher, and the idea reports an error: error: Java does not support the error of release version 5
- [Solved] JAVA Project Import jstl Error: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
- Maven error: package org.springframework.context does not exist
- IDEA Create Web Project with maven Error: The desired archetype does not exista…
- [Solved] Error:(3, 46) java: Program Package org.springframework.context.annotation does not exist
- JAVA Error: package org.apache.commons.codec.binary does not exist
- [Solved] Error: (3, 31) Java: package jdk.nashorn.internal.ir does not exist
- [Solved] Maven Project Error: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- [Solved] Error: (4, 52) Java: package org springframework. beans. factory. Annotation does not exist
- IDEA Create maven project error: Error running‘[org.apache.maven.pluginsmaven-archetype-pluginRELEASE
- [Solved] Idea Failed to recognize Maven and Project Error
- IDEA Package Error: No valid Maven installation found.
- IDEA Maven Fail to Download Dependencies Error: ERROR – #org.jetbrains.idea.maven – Cannot reconnect.
- [Solved] nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
- [Javac compilation exception] javac compilation prompts that the package in jdk cannot be found error: package jdk.internal.org.objectweb.asm does not exist and error: cannot find symbol
- IDEA Error: lombok.extern.slf4j is not exist [How to Solve]
- Executing Maven command error: Java_HOME is not defined correctly executing maven
- [Solved] IDEA Start Maven Project Error: “Error starting ApplicationContext. To display the conditions report …”
- [Solved] IDEA Maven Error: Cannot resolve xxx & Maven Dependencies Error
- Error resolution: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/Datatype