JavaWeb: Error message The superclass "javax. servlet. http. HttpServlet"

Source: Internet
Author: User
Tags blank page java web tomcat tomcat server

I haven't written Jsp for a long time. Today I created a Java Web project and configured Web container Tomcat in eclipse. I was happy to create a jsp page and add a simple Java class. However, The "red" error message appears at the top of The JSP page: the superclass "javax. servlet. http. HttpServlet" was not found on The Java Build Path. In the original Java web project, no Tomcat Runtime classes were added.


The specific solution is as follows:


1. Right-click the web Project-> property or Build Path-> Java Build Path-> Libraries-> Add Libray... -> Server Runtime-> Tomcat Server
2. Switch to Orader and Export on the Java Build Path interface and select Tomcat.
Note:
If a blank page is displayed after the Server Runtime is enabled, you need to set the Apache Server. The setting method is window-> Preferences-> Server-> Runtime Environment-> add-> select the Apache version, click Next, and then fill in the installation of your apache Server software (after decompression) address

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.