aspose file tools*
The moose likes Servlets and the fly likes Encoding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Encoding problem" Watch "Encoding problem" New topic
Author

Encoding problem

Sam Wang
Ranch Hand

Joined: Jul 17, 2001
Posts: 95
I have a Encodefilter which runs well on struts + tomcat4.
[Encodefilter]
...
request.setCharacterEncoding(encoding);
response.setContentType(contentType);
...
Now I start a new projection bases on webwork + hibernate + tomcat5.
I use the Encodefilter as a filter to url /*,and write a jsp like this:
[JSP]
<%@page contentType="text/html" %>
<%@page pageEncoding="GBK"%>
...
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=GBK">
...
The page can show chinese and english,but can't pass the chinese request parameter(it show the chinese with "???").
I watch my console,I find before the Encodefilter's doFilter(),the param is
already "???".
I don't know what's wrong.Is webwork or something else?


SCJP(2001)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Encoding problem