| dev2dev Home > dev2dev WebLogic Portal > Use with Multibyte Environments |
WebLogic Portal 8.1 SP6: Use with Multibyte Environments
Points of Caution for WebLogic Portal 8.1 SP6
Restrictions
Known Problems
Corrected Problems
There is popup text for portlet icons in the netuix-config.xml file, and Japanese text can be added as follows (bold portion).
<!-- Container supported widow states -->
<window-state name="minimized">
<activate-image>titlebar-button-minimize.gif</activate-image>
<deactivate-image>titlebar-button-unminimize.gif</deactivate-image>
<alt-text>
<locale language="ja">
<activate>Minimize (in Japanese)</activate>
<deactivate>Restore (in Japanese)</deactivate>
</locale>
<locale language="en">
<activate>Minimize</activate>
<deactivate>Restore</deactivate>
</locale>
</alt-text>
</window-state>
The netuix-config.xml file is created in the folder directly below WEB-INF after the creation of Portal Web project with workshop. %WL_HOME%\workshop\templates\portal-project.zip is in portal.war as a partial template.
The example above is for Japanese. For Korean and Chinese, switch "ja" to "ko" or "zh" respectively
Here the example for Japanese is covered:
For portal applications created with JSP or PageFlow in Shift_JIS base, add the stand-alone JSP or PageFlow settings, then take care of the settings for the portal itself.
First of all, it is necessary to carry out the following settings when creating JSP or PageFlow with Shift_JIS settings.
<%@ page language="java" contentType="text/html;charset=Shift_JIS"%>
<jsp-param>
<param-name>encoding</param-name>
<param-value>Shift_JIS</param-value>
</jsp-param>
Open the web application's character encoding settings screen from the Workshop menu (Click Tools -> Application Properties -> Encoding Order). Deselect "Use Default (UTF-8)", and set "Shift_JIS" in the encoding input field.
Note: The settings from 3-a are necessary in the case of PortalProject.
3-a. Add the weblogic.xml charset-params.
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>Shift_JIS</java-charset-name>
</input-charset>
</charset-params>
Delete the descriptors below the web.xml file.
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>UTF-8</param-value>
</context-param>
There are ContentType settings in the .portal file, and the standard is UTF-8.
In the case of Shift_JIS, it is necessary to make the following changes.
<portal:directive.page contentType="text/html;charset=Shift_JIS"/>
Change Method
When using the WebLogic Administration Portal to create a desktop based on the portal created in Shift_JIS base, it is necessary to update the portal database table.
Update Object Table:L10N_LOCALE
Update Object Column: ENCODING (UTF-8 is standard)
Change Method
Execute in the order shown below.
Supplement 1. Table Update Timing
It is necessary to change the ENCODING column in the L10N_LOCALE table for the following two rows: the row where LANGUAGE is ja and COUNTRY is JP, and the row where LANGUAGE is ja. The row where LANGUAGE is ja and COUNTRY is JP is automatically created when the portal application is deployed, but the row where LANGUAGE is ja is not registered at the time of deployment due to the content of the portal application created. In such cases, it is created automatically at the time of login to the WebLogic Administration Portal. Therefore, it is a more reliable method to change the table after logging into the WebLogic Administration Portal.
ExampleEšColumn Update for Oracle9i
SQL> UPDATE L10N_LOCALE SET ENCODING='Shift_JIS' WHERE LANGUAGE='ja'; 2 columns updated.
SQL> commit;
When creating a .layout file, be sure to set the language setting of the <netuix:locale> component within the layout file to "ja". Failure to do so may result in pages utilizing border layout to be incorrectly displayed during stream display.
The following messages are displayed for portal management.
The title for the locale [ja] is not set.
This is because the Japanese information for the layout, shell, and look & feel portal skeleton is not registered. The default only has registration information for "en", and it is necessary to go through the following steps in order to properly display other locales.
For Korean, simplified Chinese and traditional Chinese,"[ko]","[zh_CN]", "[zh_TW]" are displayed respectively.
Setting from PortalAdminEE/b>
Through these steps, the registration information for the layout, shell, and look & feel are stored in the database (Table name: L10N_RESOURCE). (For Korean, simplified Chinese and traditional Chinese,"ja" is "ko","zh_CN","zh_TW", etc.)
)
Settings from Workshop:
The skeleton files for these (for example, fourcolumn.layout, text.laf, etc.) are in the framework\markup\ folder of the Portal Web project created in workshop. The message above is not displayed if the locale values in these files are set to "ja" beforehand. %WL_HOME%\workshop\templates\portal-project.zip is in portal.war as a partial template. (For Korean, simplified Chinese and traditional Chinese,"ja" is "ko","zh", etc.))
In order to handle Japanese in the search function, it is necessary to download the Asian Locale Package from the following links, and apply it to the product.
Note: Japanese is not supported for RedHat Linux.
In order to apply the Asian Locale Package, extract the corresponding files in the following directories.
After applying the Asian Locale Package, refer to
%WEBLOGIC_HOME%\portal\thirdparty\search\common\docs\dre\dre4_axe_4.3.pdf
and perform the necessary settings for the language of use (Japanese, Korean, Chinese, etc). The following is an example of the settings necessary for Japanese support.
In PortalSearchDRE.cfg:
For Windows:
[JapaneseSJIS]
LanguageCode=31
SentenceBreaking=..\langfiles\japanesebreaking.dll
Language=JAPANESE
Encoding=SHIFTJIS
[LanguageTypes]
DefaultLanguageType=japaneseSJIS
When a database is created using the sample script WL_HOME\portal\db\sql_server\2000\admin\create_database.sql file which is provided for database creation, an unexpected behavior may occur in a portal application.
When creating a database using the script, you need to modify the contents of the script file appropriately.
Some examples for such modification are shown below.
Before
line 26:COLLATE SQL_Latin1_General_CP1_CS_AS
line 33:exec sp_addlogin 'WEBLOGIC', 'WEBLOGIC', 'WEBLOGIC', 'us_english'
After
line 26:COLLATE Japanese_CS_AS_KS_WS
line 33:line:exec sp_addlogin 'WEBLOGIC', 'WEBLOGIC', 'WEBLOGIC', 'japanese'
The display of content creation/edit dates for content management is shown in the dd-mm-yyyy US locale.
If documents sent by email for campaigns are created within UTF-8, the delivered result is invalid characters.
Avoidance Measures: It is necessary to specify system default encoding in the contentType directives for JSP files describing documents to be sent.
If you display descriptions or details for role and file items of which name have multibyte characters during export/import of portal applications using Propagation Utility, an unexpected behavior may occur in Propagation Utility causing further operations difficult, therefore, you need to avoid such attempt. Even if role names or file names using multibyte characters are present, export/import will be successfully done, if you do not display descriptions or details for the items.
The following procedures which were necessary when creating portlets with WebLogic Portal 8.1 SP2 have become unnecessary.
Localization Validation
The following descriptors are added to the WEB-INF/netuix-config.xml file, and localization is made valid.
<!-- Enable or disable localization --> <localization> <enable>true</enable> <default-locale language="en"/> </localization>
The following procedures which were necessary in order to display Japanese in Java portlets with WebLogic Portal 8.1 SP2 have become unnecessary. Japanese is displayed properly regardless of which is used for the RenderRespnse class' getWriter() method and getPortletOutputStream() method.
In order to display Japanese in Java portlets
When the portlet wizard is used to create Java portlets, the code for outputting Hello World in the portlet is automatically generated. If this Hello World is made into Japanese, invalid characters will result if the application encoding is left as the default setting (UTF-8). In order to properly output Japanese, use the getPortletOutputStream() method, not the RenderRespnse class' getWriter().
Japanese Output Example:
Title: Hello World (in Japanese)
Definition Label: helloworld
Class Name: example.portlet.HelloWorld
public class HelloWorld extends GenericPortlet
{
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
response.setContentType("text/html");
response.getWriter().write("<p>Hello World</p>");
}
}
import java.io.OutputStream;
public class HelloWorld extends GenericPortlet
{
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
response.setContentType("text/html");
String message = "<p>Hello World!! (in Japanese)</p>";
OutputStream os = response.getPortletOutputStream();
os.write( message.getBytes("UTF-8") );
}
}
The invalid character problem of the sample portal's Japanese mail Body for My Mail has been corrected.
The version of JRockit to be used with WebLogic Portal 8.1 SP6 is JRockit 8.1 SP6. It is unnecessary to apply the following patch which was necessary when using JRockit 8.1 SP2.
For 32-bit environments, there is a problem when using JRockit with locales other than English. When using JRockit with 32-bit multibyte environments, install JRockit8.1SP2 RP1 and later, or SP3 and later.