• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

c:imported jsp cannot show Chinese chars

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all , I'm from Taiwan , newbie to JSTL .
I encountered a serious problem about Chinese big5 encoding in JSTL .
For example , a index.jsp wants to include header.jsp
The first two lines of index.jsp are :
<%@ page language="java" contentType="text/html;charset=Big5" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
All chinese chars inside index.jsp can be shown correctly .
Then , I want to insert header.jsp . I've tried many ways but in vain . All Chinese (big5) words in header.jsp cannot be correctly displayed. ex:
<jsp:include page="jsp/header.jsp"/>
Chinese words become bad codes.
JSTL way :
<c:import url="jsp/header.jsp"/>
Chinese chars become question marks ("???")
<%@ include file="jsp/header.jsp" %>
com.caucho.xml.XmlParseException: stream:26: illegal character
ref at `?' (\ufffd)

Adding character-encoding='big5' in web.xml or not seems won't change the result.
What else can I do ? Can somebody help me ? Thank you.
Server environment :
Linux locale : LANG=zh_TW
Servlet Container : Resin 2.1.6
JSTL Libraries:
jstl.jar : version 1.0.2
standard.jar : version 1.0.2
 
A timing clock, fuse wire, high explosives and a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic