Errors related to eclipse web project import.

Source: Internet
Author: User

Errors related to eclipse web project import.
1. JavaWeb: error message The superclass "javax. servlet. http. HttpServlet" was not found on the Java Build Path

Solution: Right-click the web Project-> property or Build Path-> Java Build Path-> Libraries-> Add Libray...-> Server Runtime-> Tomcat Server

Switch to Orader and Export on the Java Build Path interface and select Tomcat.

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.

2. garbled Chinese characters are displayed after the import.

Before importing the project, make sure that the workspace encoding is set to UTF-8: window-> Preferences-> General-> Wrokspace-> Text file encoding-> Other select UTF-8

3. After the import, the Build Path error may occur because the JRE and Tomcat Library names in your development environment may be inconsistent with those in the source code.

The solution is as follows: right-click project-> Build Path-> Configure Build Path-> choose Libraries tab-> Delete Library with a small Red Cross-> click Add Library-> select JRE System Library (delete Tomcat select Server Runtime if the Library is used) -> select a JRE and click-> Finish.

4. Different Tomcat versions

Go to. settings directory, find org. eclipse. wst. common. project. facet. core. xml file. It is found that this sentence has a problem only after it is opened in Notepad: runtime name = "Apache Tomcat v6.0"/. In eclipse, tomcat is set to version 7.0, and its running environment is tomcat of version 6.0. So I deleted this sentence. It is normal.

 

It is recommended that you restart eclipse after completing the above operations. Sometimes, after the changes are completed, you must restart to take effect.

 

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.