MyFaces Core
  1. MyFaces Core
  2. MYFACES-3414

MyFaces ResourceImpl$ValueExpressionFilterInputStream does not handle resolving long URLs


    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.1.4
    • Fix Version/s: 2.0.12, 2.1.6
    • Component/s: General
    • Labels:


      We have logged an issue in our own JIRA tracker for this issue as well:

      It was discovered running on Liferay but the issue turn out to be not specific to portlets - it's simply manifest more obviously there. Given a CSS file with an EL resource such as:




      MyFaces will typically return something like:


      When running on Liferay, the returned URL will be much longer given the portlet namespacing and the various Liferay request parameters:


      However, the URL that is actually written into our CSS file looks like this:


      The URL is missing characters at the front


      instead of


      Almost all the resource URLs in our CSS file are mangled in a similar way. After a lot of head scratching, it turns out that the URLs are longer than ResourceImpl$ValueExpressionFilterInputStream is prepared to handle:

      private class ValueExpressionFilterInputStream extends InputStream
      private PushbackInputStream delegate;

      public ValueExpressionFilterInputStream(InputStream in)

      { super(); delegate = new PushbackInputStream(in,255); }


      For us, setting the "unread" buffer to a higher number than 255 appears to solve the issue. Perhaps this could be done a different way to account for longer URLs or at least made configurable if someone needs to adjust it.

        Issue Links


          Deryk Sinotte created issue -
          Leonardo Uribe made changes -
          Field Original Value New Value
          Link This issue is cloned as MYFACES-3417 [ MYFACES-3417 ]
          Leonardo Uribe made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Leonardo Uribe [ lu4242 ]
          Fix Version/s 2.0.12 [ 12319175 ]
          Fix Version/s 2.1.6 [ 12319173 ]
          Resolution Fixed [ 1 ]
          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          11d 17h 34m 1 Leonardo Uribe 12/Dec/11 17:14
          Resolved Resolved Closed Closed
          56d 6h 7m 1 Leonardo Uribe 06/Feb/12 23:22


            • Assignee:
              Leonardo Uribe
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: