I've got the aforementioned exception when I was trying to load a jsp page on Tomcat 6 running in a debug mode. Turns out the problem occurs when a jsp page grows big. It's a known JVM issue described by bugs 39089 and 6294277. Here is how to solve it without touching the jsp.
Open conf/web.xml In your Tomcat install directory and add a supressSmap parameter to the jsp servlet:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
..
<init-param>
<param-name>suppressSmap</param-name>
<param-value>true</param-value>
</init-param>
..
</servlet>