Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1526

Error with handling static resources under WebSphere 6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 2.0.7, 2.1.0
    • None
    • None
    • IBM WebSphere 6.0

    • Patch, Important

    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.

      Attachments

        Activity

          People

            husted Ted Husted
            acc Adam Czysciak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: