O'Reilly logo

Sams Teach Yourself JavaServer Pages™ in 21 Days by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Handling Errors

Today you'll see how to handle the case when things don't go as planned. Errors are a fact of life for most programmers (perhaps not for you if you write perfect code, but for most programmers!) and both Java and JSP offer you a number of ways of dealing with them. There are two main kinds of errors—syntax and runtime, and you'll see how to handle both of them today:

  • Syntax errors are just what they sound like—errors in Java and JSP syntax. These are handled before your application is even released.

  • Runtime errors are harder to deal with. Here, your application is fine as far as syntax goes, but there is some problem with the code's logic, and an error occurs as the user is running your application.

Because you handle syntax ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required