IBM Support

PK39337: BEHAVIOUR OF GETSERVLETPATH() AND GETPATHINFO() IS INCORRECT WITH V6.X

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Behaviour of getServletPath() and getPathInfo() is not as per
    servlet specification in v6.0
    

Local fix

  • a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: IBM WebSphere Application Server verison     *
    *                 6.0.2 and 6.1 users of the                   *
    *                 HttpServletRequest's getServletPath and      *
    *                 getPathInfo methods.                         *
    ****************************************************************
    * PROBLEM DESCRIPTION: The webcontainer returns values for the *
    *                      request object's getServletPath and     *
    *                      getPathInfo methods which are not       *
    *                      compliant with the Java Servlet         *
    *                      Specification.                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The Java Servlet Specification Version 2.4 section SRV.4.4
    states the following:
    - Servlet Path: The path section that directly corresponds to
    the mapping which activated this request. This path starts with
    a '/' character except in the case where the request is matched
    with the '/*' pattern, in which case it is an empty string.
    - PathInfo: The part of the request path that is not part of the
    Context Path or the Servlet Path. It is either null if there is
    no extra path, or is a string with a leading '/'.
    
    The webcontainer currently does not fully abide by these rules.
    The path information does not always begin with a '/' because
    the servlet path is ending with a '/'.  Also, unless the servlet
    mapping url pattern is a '/*', the getServletPath call should
    not return an empty string.
    

Problem conclusion

  • The webcontainer code was modified to remove the trailing '/'
    on the servlet path and add it to the beggining of the path
    info value. Also, if the servlet mapping url pattern is not a
    '/*' then the servlet path value will not be an empty string.
    
    To enable this functionality the following webcontainer
    custom property must be set to 'true':
    com.ibm.ws.webcontainer.removetrailingservletpathslash
    
    The fix for this APAR is currently targeted for inclusion in
    fixpack 6.0.2.23 and 6.1.0.11. 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

    PK39337

  • Reported component name

    WEBSPH APP SERV

  • Reported component ID

    5724J0800

  • Reported release

    60A

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-02-14

  • Closed date

    2007-07-02

  • Last modified date

    2007-07-02

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

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

Modules/Macros

  • ENGINE
    

Fix information

  • Fixed component name

    WEBSPH APP SERV

  • Fixed component ID

    5724J0800

Applicable component levels

  • R60A PSY

       UP

  • R60H PSY

       UP

  • R60I PSY

       UP

  • R60P PSY

       UP

  • R60S PSY

       UP

  • R60W PSY

       UP

  • R60Z PSY

       UP

  • R61A PSY

       UP

  • R61H PSY

       UP

  • R61I PSY

       UP

  • R61P PSY

       UP

  • R61S PSY

       UP

  • R61W PSY

       UP

  • R61Z PSY

       UP

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

Document Information

Modified date:
29 December 2021