When we do the Java project, there are some anomalies, how to quickly handle the exception will also affect the progress of a project development.
The following will be the faces of some of the exceptions that will be handled:
1. Database does not start
WORKAROUND: Computer--manage apps and services---->mysql--> boot
2. Project Start exception
Workaround: Url-pattern inside the web. XML has no home plus slash/
3. Class path Error
Workaround: The path to the Java class in SRC is inconsistent with the Servlet-class path in Web. xml
4. The access path is inconsistent with the Url-pattern path in Web. XML, that is, the access path is not found
Workaround: Go to Web. Xml to view the path of the initial setup and change it to the path you want.
5.tomcat7.0 or later, missing a Jstl.jar package
Workaround: Place the Jstl.jar under tomcat/lib/
6. Data connection failure, indicating database connection configuration error, URL configuration error
7. Incorrect user name or password to connect to the database
8. Data format exception, indicating that the object is converted to data when the exception, generally appear in the Integer.parseint (object) method
9. Garbled problem, when the data stored in the database is garbled, the description of processing in the back to the entrance data is garbled.
Workaround: The Encoding Method request.setcharacterencoding ("UTF-8") needs to be prepended to the process. Note that the servlet adds
Java Exception Handling 01