Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Irritating tag error behavior, JspException not caught by Jsp  RSS feed

 
Jacob Fenwick
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes when a tag inside a jsp throws an exception, I don't get the exception. Instead, it just cuts off the page at some strange, arbitrary place.

Example: I have a tag that throws a JspException from its doTag function. It throws this JspException when it catches an exception from another piece of code. Now, when I have a Jsp that is reaching this error state, but instead of getting the JspException, the page is getting cut off. I know the JspException is being thrown because I am using a System.err.println.

The question is, why is this happening, and what the heck do I do?
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More info would be helpful to diagnose and offer suggestions.

What tag?

What exception?

What's the output from System.err?

(Read the FAQ)
 
Jacob Fenwick
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here is the code for the tag. In the Tomcat dump I see "Throwing exception in MappingViewTag.java" printout but I don't see the JspException error, and I don't get the JspException showing up in the JSP page. Instead, the jsp page that calls this tag abruptly cuts off half the html of the entire page. However, the cutoff point seems to be arbitrary, I can find no relationship between where the page is cut off and this tag, it cuts off the page in the middle of some different tag. Very bizarre.



[ November 22, 2006: Message edited by: Jacob Fenwick ]
[ November 22, 2006: Message edited by: Jacob Fenwick ]
 
Jacob Fenwick
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just in case anyone ever runs into this problem again, it turns out that I was sending too much information to the page, so when the error was thrown it just dumped out whatever was in the buffer at the time. To fix this, I increased the buffer size of the page.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!