Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.2
    • Component/s: Desktop
    • Labels:
      None
    • Environment:
      jetty-6.1.3 jetspeed-2.1

      Description

      Desktop doesn't working on IE 6.0.

      I'm trying to open first page of the portal at http://localhost:8080/jetspeed/desktop
      Response is a corrupted page without any portlets.

      I have enabled dojo debuging and uncommented debug messages in javascript\jetspeed\common.js.
      The response in the Dojo debug window is follows.

      DEBUG: loaded content for url: http://localhost:8080/jetspeed/ajaxapi
      DEBUG: r e t r i e v e C o n t e n t . l o a d
      DEBUG: type:
      DEBUG: ------------------------------------------------------------
      DEBUG: Object: load
      DEBUG: ------------------------------------------------------------
      DEBUG: http:
      DEBUG: ------------------------------------------------------------
      DEBUG: Object:
      DEBUG: ------------------------------------------------------------
      DEBUG: r e t r i e v e C o n t e n t . e r r o r
      DEBUG: type:
      DEBUG: ------------------------------------------------------------
      DEBUG: Object: error
      DEBUG: ------------------------------------------------------------
      DEBUG: error:
      DEBUG: ------------------------------------------------------------
      DEBUG: Object: [object Object]
      DEBUG: message: XMLHttpTransport.watchInFlight Error: [object Error]
      DEBUG: number: 0
      DEBUG: type: unknown
      DEBUG: ------------------------------------------------------------
      FATAL exception raised: PageContentListenerCreateWidget error url: http://localhost:8080/jetspeed/ajaxapi type: error error: XMLHttpTransport.watchInFlight Error: [object Error]
      DEBUG: XMLHttpTransport error callback failed: [object Error]

      The same actions are working fine in Firefox 2.0

        Activity

        Hide
        Sergey Parilin added a comment -

        I have investigated around this problem and found the cause. The issue occurs at tomcat 6.* and jetty-6.* only. At tomcat this issuer occures either on firefox and IE.
        The cause is a i18n information in <metadata /> tags in psml files. The i18n characters breaks the xml transmission and the browser receives an invalid xml response.
        I suppose that the real cause of this issue is a response encoding settings of the server but i can't find solution at this time.
        I will continue working around. Any kind of help is welcome.

        Show
        Sergey Parilin added a comment - I have investigated around this problem and found the cause. The issue occurs at tomcat 6.* and jetty-6.* only. At tomcat this issuer occures either on firefox and IE. The cause is a i18n information in <metadata /> tags in psml files. The i18n characters breaks the xml transmission and the browser receives an invalid xml response. I suppose that the real cause of this issue is a response encoding settings of the server but i can't find solution at this time. I will continue working around. Any kind of help is welcome.
        Hide
        Woonsan Ko added a comment -

        IMHO, this is a problem of Jetspeed 2 itself.
        Because the responses for ajax api are always UTF-8 encoded XML, the writing must be encoded as UTF-8. However, the current implementation does not create a right writer.
        Instead it writes with the default servlet output stream.
        Tomcat 6 and Jetty 6 seem to be stricter on this.
        Please see the attached patch. I just added a OutputStreamWriter using UTF-8.
        When I tested with the patch on Tomcat 6, the problem was cleared.
        Please comment on this if I missed any other important thing.

        Show
        Woonsan Ko added a comment - IMHO, this is a problem of Jetspeed 2 itself. Because the responses for ajax api are always UTF-8 encoded XML, the writing must be encoded as UTF-8. However, the current implementation does not create a right writer. Instead it writes with the default servlet output stream. Tomcat 6 and Jetty 6 seem to be stricter on this. Please see the attached patch. I just added a OutputStreamWriter using UTF-8. When I tested with the patch on Tomcat 6, the problem was cleared. Please comment on this if I missed any other important thing.
        Hide
        Ate Douma added a comment -

        I haven't tried Jetspeed with Tomcat 6 yet, but I have with Jetty 6.1.4 and had no problems accessing the desktop through Firefox.
        Can you please provide more context information when/under which conditions this occurs so I can try to reproduce (e.g. your firefox version, language setting, jdk used etc.)

        Show
        Ate Douma added a comment - I haven't tried Jetspeed with Tomcat 6 yet, but I have with Jetty 6.1.4 and had no problems accessing the desktop through Firefox. Can you please provide more context information when/under which conditions this occurs so I can try to reproduce (e.g. your firefox version, language setting, jdk used etc.)
        Hide
        Sergey Parilin added a comment -

        Yes, on Jetty-6.* and Firefox desktop working fine. On Jetty-6.* and IE it doesn't working. On Tomcat 6 it doesn't working neither on Firefox not on IE.
        On Tomcat-6 the response of the ajaxapi call is following (I'm using Firebug):
        <js>
        <status>success</status>
        <action>getpage</action>
        <page hidden='false'>
        <defaults
        layout-decorator='tigris'
        portlet-decorator='tigris'
        theme=''
        />
        <name>default-page.psml</name>
        <path>/default-page.psml</path>
        <profiledPath>/default-page.psml</profiledPath>
        <title>Welcome to Jetspeed 2</title>
        <short-title>Welcome to Jetspeed 2</short-title>
        <metadata name="title" xml:lang="fr">Ma Premiere Page de PSML</metadata>
        <metadata name="title" xml:lang="ja">Jetspeed 2
        <js><status>failure</status><action>unknown</action></js>

        As Woonsan Ko have written already, the problem in the response encoding. After ajax-response.diff patch, desktop working fine everywhere.

        I'm not an expert in servlet specification, but maybe the cause of the different behaviour on different tomcat versions is a servlet specification switching to 2.5? This is my assumption.

        My settings are:
        Firefox 2.0.0.4
        Internet Explorer 6.0.some_long_digits
        Locale: United States
        JDK: 1.5.0_09

        But i think it's not important.

        Show
        Sergey Parilin added a comment - Yes, on Jetty-6.* and Firefox desktop working fine. On Jetty-6.* and IE it doesn't working. On Tomcat 6 it doesn't working neither on Firefox not on IE. On Tomcat-6 the response of the ajaxapi call is following (I'm using Firebug): <js> <status>success</status> <action>getpage</action> <page hidden='false'> <defaults layout-decorator='tigris' portlet-decorator='tigris' theme='' /> <name>default-page.psml</name> <path>/default-page.psml</path> <profiledPath>/default-page.psml</profiledPath> <title>Welcome to Jetspeed 2</title> <short-title>Welcome to Jetspeed 2</short-title> <metadata name="title" xml:lang="fr">Ma Premiere Page de PSML</metadata> <metadata name="title" xml:lang="ja">Jetspeed 2 <js><status>failure</status><action>unknown</action></js> As Woonsan Ko have written already, the problem in the response encoding. After ajax-response.diff patch, desktop working fine everywhere. I'm not an expert in servlet specification, but maybe the cause of the different behaviour on different tomcat versions is a servlet specification switching to 2.5? This is my assumption. My settings are: Firefox 2.0.0.4 Internet Explorer 6.0.some_long_digits Locale: United States JDK: 1.5.0_09 But i think it's not important.
        Hide
        Ate Douma added a comment -

        Thanks Sergey.

        I can test Jetty-6 + IE6 at the office later today as I'm 100% Linux at home

        If I can reproduce the problem and the patch from Woonsan fixes it, I'll apply it.

        NB: did you test apply the patch yourself and did it solve the problems?

        Show
        Ate Douma added a comment - Thanks Sergey. I can test Jetty-6 + IE6 at the office later today as I'm 100% Linux at home If I can reproduce the problem and the patch from Woonsan fixes it, I'll apply it. NB: did you test apply the patch yourself and did it solve the problems?
        Hide
        Sergey Parilin added a comment -

        I think the Woonsan's patch is a very quick solution. I jetspeed newbie, and can't make better, but i think response encoding management is more common problem then only in ajax API. It would be nice if encoding management will implemented as Valve. But it's my humble opinion . May be this idea is not correct.

        Show
        Sergey Parilin added a comment - I think the Woonsan's patch is a very quick solution. I jetspeed newbie, and can't make better, but i think response encoding management is more common problem then only in ajax API. It would be nice if encoding management will implemented as Valve. But it's my humble opinion . May be this idea is not correct.
        Hide
        Ate Douma added a comment -

        Issue confirmed with Jetty 6.1.4 and IE 6.0
        And patch indeed fixes this, applied.
        Thanks Woonsan.

        Show
        Ate Douma added a comment - Issue confirmed with Jetty 6.1.4 and IE 6.0 And patch indeed fixes this, applied. Thanks Woonsan.

          People

          • Assignee:
            Ate Douma
            Reporter:
            Sergey Parilin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development