ICEfaces
  1. ICEfaces
  2. ICE-5292

OutputStyleRenderer can't detact the browser when running on WebSphere

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      WebSphere

      Description

      The component OutputStyle works correctly in JBOSS and renders the correct CSS include links when we hit the application using IE6/IE7.

      However in Websphere, the code in OutputStyleRenderer is not able to detect the browser correctly because of a bug in Websphere. The following line returns a null

      useragent = request.getHeader("user-agent");

      This is because in Websphere, the parameter is spelled as "User-Agent"

        Issue Links

          Activity

          Hide
          Arran Mccullough added a comment -

          Comment from customer:

          On further debugging, the following information was found which may be helpful when resolving the bug.

          In the class com.icesoft.faces.webapp.http.servlet.ServletEnvironmentRequest the constructor sets up a hashmap of header variables.
          It also provides a custom implementation of the getHeader() call as a hashmap lookup. This then makes it incompatible with the request.getHeader("user-agent") call in OutputStyleRender in Websphere.

          When the hashmap is being setup, the getHeaders method is called on the initialrequest object that returns Pascal case values as keys ("User-Agent") in WebSphere.

          Show
          Arran Mccullough added a comment - Comment from customer: On further debugging, the following information was found which may be helpful when resolving the bug. In the class com.icesoft.faces.webapp.http.servlet.ServletEnvironmentRequest the constructor sets up a hashmap of header variables. It also provides a custom implementation of the getHeader() call as a hashmap lookup. This then makes it incompatible with the request.getHeader("user-agent") call in OutputStyleRender in Websphere. When the hashmap is being setup, the getHeaders method is called on the initialrequest object that returns Pascal case values as keys ("User-Agent") in WebSphere.

            People

            • Assignee:
              Unassigned
              Reporter:
              Arran Mccullough
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: