IBM Support

PI37304: INCORRECT JSP TRANSLATION FOR THE EXPRESSION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The JSP engine incorrectly translates the following expression:
    
    <% for (int i=0;i<10;i++) {%>
    <%= i+1+"" %>
    <% } %>
    
    The expected result is 1 2 3 4 5 6 7 8 9 10, but the returned
    result is 01 11 21 31 41 51 61 71 81 91.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Full       *
    *                  Profile versions 7.0, 8.0 and 8.5.5 and     *
    *                  Liberty Profile version 8.5.5 users of      *
    *                  JavaServer Pages (JSP).                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: All the elements being operated with    *
    *                      the addition symbol (+) in a JSP        *
    *                      expression containing at least one      *
    *                      string literal will be concatenated.    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If a user has a JSP expression with at least one string in it,
    all the other elements in that same JSP expression will be
    concatenated. This means that if in that expression there was
    a number addition, these numbers will be concatenated and not
    added as expected.
    For example:
    <% for (int i=0;i<10;i++) {%>
    <%= i+1+"" %>
    <% } %>
    Will produce: 01 11 21 31 41 51 61 71 81 91
    The expected result is: 1 2 3 4 5 6 7 8 9 10
    

Problem conclusion

  • The JSP container was modified to add the numbers accordingly
    when in a JSP expression with at least one string. To enable
    this fix, the following JSP attribute needs to be set:
    
    allowPrecedenceInJspExpressionsWithConstantString: true /
    false (default)
    
    If using the JSP Batch Compiler the following parameter needs
    to be specified:
    
    -allowPrecedenceInJspExpressionsWithConstantString true /
    false (default)
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.11 and 8.5.5.6.  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

    PI37304

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-03-18

  • Closed date

    2015-04-30

  • Last modified date

    2015-04-30

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

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

    PI39430 PI39431

Fix information

  • Fixed component name

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R61A PSY

       UP

  • R61H PSY

       UP

  • R61I PSY

       UP

  • R61P PSY

       UP

  • R61S PSY

       UP

  • R61W PSY

       UP

  • R61Z PSY

       UP

  • R700 PSY

       UP

  • R800 PSY

       UP

  • R850 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":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022