Forums Register Login

JSTL format tag not showing the special character

+Pie Number of slices to send: Send
Hi
I am using the JSTL to read/show the properties values on the screen (using fmt - tag). Now my problem is the properties contains English values then – reading fine. In case I try to load the Japanese values then not loading properly – I checked – JSTL default charset is ISO-5589-1. So, char not showing properly.

In my JSP page I setting request encoding type (response and format tag)

1. response.setCharacterEncoding("UTF-8");
2. <fmt:requestEncoding value="utf-8"/>

Always getting the wrong Japanese char.

I here attached the properties files.

JSP
****

<%@ page isELIgnored ="false" %>
   <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
   <%@ taglib prefix="fmtMdfOrder" uri="http://java.sun.com/jsp/jstl/fmt" %>
   
<fmtMdfOrder:setLocale value="ja_JP"/>
<fmtMdfOrder:setBundle basename="com.pro.GmOrderAction"/>
<fmtMdfOrder:requestEncoding value="UTF-8"/>
<%
response.setCharacterEncoding("UTF-8");
System.out.println(" Hello world testing ");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><fmtMdfOrder:message key="LBL_MODIFY_ORDER"/></title>
</head>
<body>
<fmtMdfOrder:message key="LBL_MODIFY_ORDER"/>
<fmtMdfOrder:message key="LBL_HEADER"/>
<fmtMdfOrder:message key="LBL_CUSTPO"/>
<fmtMdfOrder:message key="LBL_PARDO"/>
<fmtMdfOrder:message key="LBL_ORDDATE"/>
出荷日

</body>
</html>

Properties
*************
LBL_MODIFY_ORDER = 注文を修正する
LBL_HEADER  = 受注 - 編集
LBL_REP_ACCT  = Repアカウント
LBL_ORDERID  = 注文ID
LBL_PARENT_ACCOUNT  = 親アカウントを表示する


Please let me know what can I do for this.


Thanks,
Mani
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 788 times.
Similar Threads
I cant set any values in my Action Form for Contact object:
web container displaying jsp intead of html
Problem with encoding type in the browser
wanted to create own tag in struts using NetBeans and use it in .jspx file
struts tag problem ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:51:00.