Common JSP + Servlet Errors for beginners, jspservlet for beginners

Source: Internet
Author: User

Common JSP + Servlet Errors for beginners, jspservlet for beginners

Common Errors in web programming:

I. 404 (the resource to be accessed is not found)

1. Whether the web program is deployed (add the project to tomcat)

2. Are there any url errors (including case sensitivity, including whether the project has been renamed)

3. Have you put jsp/html in the WEB-INF?

4. If you access servlet, check whether the configuration in url-pattern in web. xml is consistent with the name you wrote.

 

Ii. 500 (the program has an exception, that is, the Code has a problem)

1. ClassNotFoundException

Tip: oracle. jdbc. driver. OracleDriver

  1. Check whether the jar package of oracle is in the project.
  2. Check whether the driver class package name. class name has an error.

 

2. SQLException (..........)

JDBC operation, URL, username, and password Problems

 

 

3. java.net. BindException: Address already in use: JVM_Bind: 8080

Cause: port 8080 is already in use, that is, there are at least two servers in use.

  1. In the task manager, check that there are two javaw.exe(atat5.exe). Disable the following one.

 

4. java. lang. NumberFormatException: null

An error occurred while formatting the number.

Cause: null

Receives a null value and forcibly converts the value to a number.

Solution: Pass the value at the request

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.