1. Because JSP have built in assumptions that they will be writing HTML text and open the response stream for text output. Avoiding this is reallllllly cumbersome so dont try.
2. Naturally this depends on the kind of error - there are so many ways to go wrong with JSP.
a. make your error page informative
b. check variables for null before trying to use them
c. examine the
Java code that the JSP compiler creates to see what is really trying to execute - you may be surprised.
Bill