Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JSTL format tag not showing the special character  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!