How does it affect the performance if we use a try catch in a jsp page to catch an error?I want to use this as the error page call is not that effective. Is there any other way of catching exceptions in jsp ?

drit .

The answer is: 0 to 3 clock cycles on JIT-enabled systems, and 30 to 40 on non-JIT-enabled systems. That is, negligible cost until you throw an exception.

For more reading, see

  • Building High-Performance Applications and Servers in Java: An Experiential Study
  • Need for speed