Maven Project Tip could not find javax.servlet.xxx problem solved

Source: Internet
Author: User

The Javax.servlet.http.HttpServletRequest class was used in the recent project to find out the default jar package for idea, and tried the following:

1. Add Servlet-api.jar and Jsp-api.jar to the libraries of the project without prompting for errors, but Maven compiles the prompt to not find the class

2. Add references to Servlet-api.jar and Jsp-api.jar in Classpath, with 1 effect

3. The following dependencies are added to Maven

<dependency>

<groupId>org.apache.geronimo.specs</groupId>

<artifactId>geronimo-servlet_2.4_spec</artifactId>

<version>1.1.1</version>

<scope>provided</scope>

</dependency>

This is the jar that Geronimo has distributed externally to the servlet that can give open source code, passing the sun's CTK compatibility test. Save the original load Jndi,jdbc,servlet,jsp,jta

Problem Solving!!!


Maven Project Tip could not find javax.servlet.xxx problem solved

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.