IBM Support

PK47397: PATH INFO RETURNS AN INCORRECT VALUE IF MULTIPLE SERVLET MAPPINGS ARE DEFINED WITH SIMILAR URI'S

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Servlet mappings like the following sample will cause the path
    info to be incorrect.
    
    web.xml:
          <servlet-mapping>
             <servlet-name>MyServlet</servlet-name>
    
    <url-pattern>/test/folder/temp/myapp/docs/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping id="ServletMapping_1047421195717">
             <servlet-name>MyOtherServlet</servlet-name>
             <url-pattern>/test/*</url-pattern>
          </servlet-mapping>
    
    Below is an example of the incorrect path mapping
    
    Get issued for:
    https://localhost:9443/contextRoot/test/folder/tmp/servlet
    Wrong HttpServletRequest information received based on
    url-patterns.
    URI: /contextRoot/test/folder/tmp/servlet
    Context path: /contextRoot
    Servlet path: /test/folder/tmp/
    Path info: /servlet
    With first servlet-mapping removed, correct information
    received.
    URI: /contextRoot/test/folder/tmp/servlet
    Context path: /contextRoot
    Servlet path: /test
    Path info: /folder/tmp/servlet
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: IBM WebSphere Application Server version 6   *
    *                 users who may define several servlet         *
    *                 mappings with similar paths in URI.          *
    ****************************************************************
    * PROBLEM DESCRIPTION: When there are multiple servlet         *
    *                      mappings defined in web.xml with        *
    *                      similar path (s), path info returns     *
    *                      an incorrect value.                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Webcontainer travels down the path URI (one directory at a
    time) and tries to  match the incoming URI with the defined
    servlet mapping in web.xml.  While doing  this, it should have
    remembered the last best match of a servlet mapping but failed
    to do so. Instead, it kept updating its local servlet path
    index every time a matched directory was found. The remaining
    unmatched information in the URI was then used as path info.
    

Problem conclusion

  • The webcontainer has been modified so that it only updates the
    servlet path index if there is a perfect match.  This will
    help returning the correct path info when there are multiple
    servlet mappings with similar URI's paths.
    
    The fix for this APAR is currently targeted for inclusion
    in fixpacks 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

    PK47397

  • Reported component name

    WEBSPH APP SERV

  • Reported component ID

    5724J0800

  • Reported release

    60W

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-06-19

  • Closed date

    2007-07-17

  • Last modified date

    2007-07-17

  • 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:
28 December 2021