Pluto
  1. Pluto
  2. PLUTO-446

No way to set default page encoding for Pluto

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.1.5, 2.0.0
    • Component/s: portal driver
    • Labels:
      None

      Description

      i want pluto to use UTF-8 as a default encoding for web pages as by default it uses ISO-8859-1.

      I've red http://portals.apache.org/pluto/userguide/portal.html#Internationalization but it seems to be outdated, as in pluto 1.1.4 web.xml i don't see a "pluto" servlet defined.

      I've tried to put init parameter to plutoPortalDriver servlet with no luck:
      <servlet>
      <servlet-name>plutoPortalDriver</servlet-name>
      <display-name>Pluto Portal Driver</display-name>
      <description>Pluto Portal Driver Controller</description>
      <servlet-class>org.apache.pluto.driver.PortalDriverServlet</servlet-class>
      <init-param>
      <param-name>charset</param-name>
      <param-value>utf-8</param-value>
      </init-param>
      </servlet>

      The question is how do i set default encoding to pluto generated web content?

      1. pluto-web.xml.diff
        0.6 kB
        miceuz
      2. pluto-encoding2.diff
        2 kB
        miceuz

        Activity

        miceuz created issue -
        Hide
        miceuz added a comment -

        this patch fixes above error.

        now the driver servlet looks for "charset" init param in web.xml like it was in 1.0.1 release.

        Show
        miceuz added a comment - this patch fixes above error. now the driver servlet looks for "charset" init param in web.xml like it was in 1.0.1 release.
        miceuz made changes -
        Field Original Value New Value
        Attachment pluto-encoding.diff [ 12370214 ]
        Hide
        Craig Doremus added a comment -

        This patch does not work because the CONTENT_TYPE value is not set in doGet(). Also, can you copy over the commented out 'charset' init-param in web.xml from Pluto 1.0.1 source code? Please test this when you have done these changes.

        Also, you should be aware that individual portlets can set their content type (and charset) using RenderResponse.setContentType().

        Show
        Craig Doremus added a comment - This patch does not work because the CONTENT_TYPE value is not set in doGet(). Also, can you copy over the commented out 'charset' init-param in web.xml from Pluto 1.0.1 source code? Please test this when you have done these changes. Also, you should be aware that individual portlets can set their content type (and charset) using RenderResponse.setContentType().
        miceuz made changes -
        Attachment pluto-encoding.diff [ 12370214 ]
        Hide
        miceuz added a comment -

        sorry for the last patch, this one really does work.

        Show
        miceuz added a comment - sorry for the last patch, this one really does work.
        miceuz made changes -
        Attachment pluto-encoding2.diff [ 12370645 ]
        miceuz made changes -
        Attachment pluto-web.xml.diff [ 12370646 ]
        miceuz made changes -
        Fix Version/s 1.1.5 [ 12312652 ]
        Elliot Metsger made changes -
        Fix Version/s 1.2.0 [ 12312213 ]
        Elliot Metsger made changes -
        Fix Version/s 2.0.0 [ 12312914 ]
        Fix Version/s 1.2.0 [ 12312213 ]
        Hide
        Elliot Metsger added a comment -

        Committed (modified the patch a little bit) to both 1.1.x and trunk.

        Show
        Elliot Metsger added a comment - Committed (modified the patch a little bit) to both 1.1.x and trunk.
        Elliot Metsger made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12417861 ] Default workflow, editable Closed status [ 12565027 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565027 ] jira [ 12585923 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development