JavaWeb: error message The superclass & quot; javax. servlet. http. HttpServlet & quot; was not found on the Java Build Path, httpservlet

Source: Internet
Author: User

JavaWeb: error message The superclass "javax. servlet. http. HttpServlet" was not found on the Java Build Path, httpservlet
JavaWeb: error message The superclass "javax. servlet. http. HttpServlet" was not found on the Java Build Path

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.


A servlet class was created when netbeans was working on Java Web. In other computers, how does one solve javaxservlethttpHttpServlet errors?

Javax. servlet. http. HttpServle has a compilation error because there are fewer packages.
@ Override: the compilation error may be caused by the absence of a package. As a result, the compiler cannot find the corresponding method of the parent class.
In short, you need to import the corresponding package, you copy the servlet-api.jar In the lib folder in tomcat6.0 to the project, add to the compilation path try

The superclass "javaxservlethttpHttpServlet" was not found on the Java Build Path

Servlet. jar is not referenced. See blog.snsgou.com/post-487.html
 

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.