tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: TC 7.0.16 IllegalStateException thrown by pageContext.include
Date Sat, 25 Jun 2011 09:27:41 GMT
On 24.06.2011 18:42, David Wall wrote:
> 
> 
> On 6/24/2011 5:48 AM, Rainer Jung wrote:
>> On 24.06.2011 14:08, Tim Funk wrote:Looks like this is the root cause
>> from DefaultServlet ...
>>> While the ISE is caught ... since the mimetype for js was changed - it
>>> doesn't match the fallback method ....
>>>
>>>              try {
>>>                  ostream = response.getOutputStream();
>>>              } catch (IllegalStateException e) {
>>>                  // If it fails, we try to get a Writer instead if we're
>>>                  // trying to serve a text file
>>>                  if ( (contentType == null)
>>>                          || (contentType.startsWith("text"))
>>>                          || (contentType.endsWith("xml")) ) {
>>>                      writer = response.getWriter();
>>>                      // Cannot reliably serve partial content with a
>>> Writer
>>>                      ranges = FULL;
>>>                  } else {
>>>                      throw e;
>>>                  }
>>>              }
>>>
>>> So one patch is this (which will catch all javascript variants if
>>> multiple
>>> exist)
>>>                  if ( (contentType == null)
>>>                          || (contentType.startsWith("text"))
>>>                          || (contentType.endsWith("xml"))
>>> +                        || (contentType.contains("/javascript")) ) {
>> Patch applied and credited to you in r1139280.
>>
>> Thanks!
>>
>> Rainer
> 
> Thanks you all for fixing this.  I think that makes good sense that TC
> 7's DefaultServlet recognize javascript as a text type like 'text' and
> 'xml'.

Are you able to apply the patch, recompile Tomcat and check, whether the
patch actually fixes your problem? Feedback welcome!

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message