Eclipse cannot parse the solution for importing Javax.servlet

Source: Internet
Author: User
Tags tomcat tomcat server apache tomcat

The reason for this problem is that your Eclipse project did not import the Tomcat class library required for JSP operations, mainly Servlet-api.jar files (or Servlet.jar), which are in the Tomcat container, in the following location:%tomcat_ Home%/common/lib/servlet-aip.jar, you want to import it into your project's build path (if you are using Eclipse).

Import method: Right-click your Eclipse project and choose Build Path--Configure build path. Click on the Library tab, and clicking the Add Library button on the right in the Add Library dialog box that appears, select Server Runtime, click Next, and in the dialog box that appears, select the Tomcat server that you are using, for example, my Apache tomcat v5.5, click Finish. Your Tomcat class library is added to the current project.

Expand the Java resources:src->libraries in turn to see that the Apache Tomcat V5.5[apache Tomcat v5.5] class library has been added to the current project.

Note: For the contents of configuring the Tomcat server in Eclipse, omit it here.

Related Article

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.