users@jersey.java.net

JSP multiple <c:import> issue

From: Justin Emery <justin.emery_at_gmail.com>
Date: Tue, 3 Aug 2010 21:57:19 +0100

Hi,

I am returning Viewable objects to requests in order to have a JSP process the output. In the JSP I have a <c:forEach> loop which contains a <c:import> tag, in order to insert a fragment of output from another resource. The importing is working, but once the length of output reaches 8192 bytes the client receives no more content. In the logs I see the following exception: java.lang.IllegalStateException: Cannot forward after response has been committed

After some experimentation I have found:
- Simply using two <c:import>s has the same issue, i.e. the <c:forEach> loop appears to be irrelevant.
- A single <c:import> referring to a large file does work with content length greater than 8192.

I would assume 8192 is the length of some buffer.

Has anyone else experienced this issue? Does this sound like a bug in Jersey?

Thanks,

Justin