Hi,
I want to create a page that display chinese character, below is my code
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<HTML>
<HEAD>
<!-- META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" -->
<SCRIPT>var isomorphicDir="../isomorphic/";</SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=../isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD>
<BODY>
<fmt:bundle basename="LabelsBundle">
<fmt:setLocale value="zh-CN" scope="session"/>
<SCRIPT><!--
isc.DynamicForm.create({
fields:[
{title:<fmt:message key="name"/> , ID:"txtName", name:"name", _constructor:"TextItem"},
{title:<fmt:message key="email"/> , ID:"txtEmail", name:"email", _constructor:"TextItem"},
{value:<fmt:message key="handphone"/> , ID:"txtHp", name:"hp", _constructor:"TextItem"}
],
ID:"frmUser",
autoDraw:false,
autoFetchData: true
})
--></SCRIPT>
</fmt:bundle>
</BODY>
</HTML>
and this is the content of my resource bundle
name=\u540d\u5b57
email=\u7535\u90ae
handphone=\u624b\u63d0\u53f7\u7801
The page cannot be loaded, firebug show the following error
\u540D\u5B57 is not defined
simple_i18n.jsp()()simple_i18n.jsp (line 24)
[Break on this error] {title:名字 , ID:"txtName", name:"name", _constructor:"TextItem"},
Script section under firebug shows below
....loading....
16 x 16
Firebug's log limit has been reached. %S entries not shown. Preferences
Firebug's log limit has been reached. %S entries not shown. Preferences
<html>
<head>
</head>
<body class="normal" bgcolor="#606060" style="overflow: hidden;">
</body>
</html>
Firebug's log limit has been reached. %S entries not shown. Preferences
\u540D\u5B57 is not defined
simple_i18n.jsp()()simple_i18n.jsp (line 24)
[Break on this error] {title:名字 , ID:"txtName", name:"name", _constructor:"TextItem"},
simple_i18n.jsp (line 24)
1
2
3
4<HTML>
5<HEAD>
6 <!-- META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" -->
7 <SCRIPT>var isomorphicDir="../isomorphic/";</SCRIPT>
8 <SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
9 <SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
10 <SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
11 <SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
12 <SCRIPT SRC=../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
13 <SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
14 <SCRIPT SRC=../isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
15</HEAD>
16
17<BODY>
18
19
20
21<SCRIPT><!--
22isc.DynamicForm.create({
23 fields:[
24 {title:名字 , ID:"txtName", name:"name", _constructor:"TextItem"},
25 {title:电邮 , ID:"txtEmail", name:"email", _constructor:"TextItem"},
26 {value:手提号码 , ID:"txtHp", name:"hp", _constructor:"TextItem"}
27 ],
28 ID:"frmUser",
29 autoDraw:false,
30 autoFetchData: true
31})
32--></SCRIPT>
33
34</BODY>
35</HTML>
36
Firebug's log limit has been reached. %S entries not shown. Preferences
<html>
<head>
</head>
<body>
</body>
</html>
What have I done wrong? Any help is appreciated.