This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 159481 - Character Encoding defect when using Visual Web JSF & Portal Pack 3.0
Summary: Character Encoding defect when using Visual Web JSF & Portal Pack 3.0
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Portalpack (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Satyaranjan D
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-03 04:28 UTC by liufuyang
Modified: 2009-03-17 07:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Picture of JSF-Portlet-Encoding-Issue (28.49 KB, image/jpeg)
2009-03-03 04:53 UTC, liufuyang
Details
Picture of JSF-Portlet-Encoding-Issue-ide-design (144.73 KB, image/jpeg)
2009-03-03 04:54 UTC, liufuyang
Details
Picture of JSF-Portlet-Encoding-Issue-ide-jsp (130.39 KB, image/jpeg)
2009-03-03 04:55 UTC, liufuyang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description liufuyang 2009-03-03 04:28:41 UTC
(Netbeans 6.5 + Visual Web JSF + Portal Pack 3.0 + Webspace 10)
I create a simple project of Visual Web JSF and Portal Support, and then create a simple Visual Web JSF portlet page,
and drag a staticText woodstock component to the design page, and set the text to some Chinese words like "测试中文".
Then when the project is deployed, what I see in the protlet is "????????????" instead of "测试中文".
Every where the defult encoding is set to UTF-8 and I did not change anything else, code is generated by IDE.
One thing you should notice is that, combining with portlet, when using standard JSF component like "<h:><f:>" the
encoding is right. Just when using woodstock component in the portlet the encoding goes wrong.
Comment 1 liufuyang 2009-03-03 04:36:55 UTC
More details on this:
The jsp file of the Visual Web JSF porject:

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : JSFPortletPage1
    Created on : Feb 27, 2009, 4:19:02 PM
    Author     : Freddy.Liu
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:p="http://java.sun.com/jsf/portlet/components" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <p:portletPage>
            <div style="-rave-layout: grid; position: relative; height: 400px; width: 400px;">
                <webuijsf:themeLinks binding="#{JSFPortletPage1.themeLinks1}" id="themeLinks1" parseOnLoad="false"
webuiAll="true"/>
                <webuijsf:form binding="#{JSFPortletPage1.form1}" id="form1">
                    <webuijsf:staticText id="staticText1" style="position: absolute; left: 144px; top: 96px"
                        text="测试中文1"/>
                    测试中文2

                <h:inputText id="textField1"
                        style="position: absolute; left: 144px; top: 216px" value="测试中文3"/>
                </webuijsf:form>
            </div>
        </p:portletPage>
    </f:view>
</jsp:root>

****************
The result on the page is like: "????????????1 测试中文2 测试中文3"
And you can see that only <webuijsf:staticText failed to encoding text to UTF-8 on the page, while standard component
and the text written in jsp file both works ok.
Comment 2 liufuyang 2009-03-03 04:53:29 UTC
Created attachment 77599 [details]
Picture of JSF-Portlet-Encoding-Issue
Comment 3 liufuyang 2009-03-03 04:54:33 UTC
Created attachment 77600 [details]
Picture of JSF-Portlet-Encoding-Issue-ide-design
Comment 4 liufuyang 2009-03-03 04:55:16 UTC
Created attachment 77601 [details]
Picture of JSF-Portlet-Encoding-Issue-ide-jsp
Comment 5 Satyaranjan D 2009-03-04 07:16:46 UTC
Can you please try the same thing with a Woodstock web application (without portlet) ? If the behavior is same then we
need to file a bug on woodstock component. https://woodstock.dev.java.net
Comment 6 liufuyang 2009-03-04 08:41:24 UTC
Without portal is OK. And even using OpenPortal Container there is NO problem. Just when Woodstock used in the Webspace
10 (liferay portal) the problem shows up.