IBM Support

PI44214: getParameter() does not work after getReader()

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If an application calls
    javax.servlet.ServletRequest.getReader() followed by
    javax.servlet.ServletRequest.getParameter() a
    java.lang.IllegalStateException will be thrown and no
    parameters will be available. This is because the
    WebContainer tries to read parameters from the post data but
    cannot because getReader() has already been called. However
    according the spec, in this situation parameters are not
    available form the post data and the WC should not attempt
    to read them. Instead the WC should ignore the post data and
    read any parameters from the query string.
    
    There is a similar problem if the app calls
    javax.servlet.ServletRequest.getInputStream() before
    getParameter(). in this case an exception will not be thrown
    but WebContainer will continue to read paramaters from the
    post data (which may have been partially read) when it
    should not.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile and Full Profile     *
    *                  version 8.5.5                               *
    ****************************************************************
    * PROBLEM DESCRIPTION: A java.lang.IllegalStateException is    *
    *                      thrown when calling                     *
    *                      javax.servlet.ServletRequest.getParamet *
    *                      er() after                              *
    *                      javax.servlet.ServletRequest.getReader( *
    *                      )                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If an application calls javax.servlet.ServletRequest.getReader()
    followed by javax.servlet.ServletRequest.getParameter() a
    java.lang.IllegalStateException will be thrown.
    

Problem conclusion

  • The WebContainer code was modified to  allow calling
    getParameter() after getReader() to get the parameters from the
    query string.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.7.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI44214

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-07-03

  • Closed date

    2015-08-11

  • Last modified date

    2015-08-11

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022