You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Adam Czysciak (JIRA)" <ji...@apache.org> on 2006/11/28 15:15:57 UTC

[jira] Updated: (WW-1526) Error with handling static resources under WebSphere 6

     [ http://issues.apache.org/struts/browse/WW-1526?page=all ]

Adam Czysciak updated WW-1526:
------------------------------

    Description: 
It seems to be a bug with WebSphere, but a tiny patch to Struts2 can fix it.

The findStaticResource method of FilterDispatcher calls copy(), then closes the InputStream. It works well for static resources bigger than 4kb, bit it fails with "cannot obtain output stream" forsmaller files.

The patch is very simple: call output.flush() at the end of copy() method. Works perfect with WebSphere 6.

  was:
It seems to be a bug with WebSphere, but a tiny patch to Struts2 can fix it.

The findStaticResource method of FilterDispatcher calls copy(), then closes the InputStream. It works well for static resources bigger than 4kb, bit it fails with "cannot obtain output stream" forsmaller files.

The patch is very simple: call is.flush(); just before is.close() in finally block of this method. Works perfect with WebSphere 6.


> Error with handling static resources under WebSphere 6
> ------------------------------------------------------
>
>                 Key: WW-1526
>                 URL: http://issues.apache.org/struts/browse/WW-1526
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>         Environment: IBM WebSphere 6.0
>            Reporter: Adam Czysciak
>
> It seems to be a bug with WebSphere, but a tiny patch to Struts2 can fix it.
> The findStaticResource method of FilterDispatcher calls copy(), then closes the InputStream. It works well for static resources bigger than 4kb, bit it fails with "cannot obtain output stream" forsmaller files.
> The patch is very simple: call output.flush() at the end of copy() method. Works perfect with WebSphere 6.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira