This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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)
 
Don't get me started about those stupid light bulbs.
 
subject: Encoding problem
 
Similar Threads
Chinese name in URL
a problem in jbuilder6+weblogic when developing jsp
problem of internationalism in struts framework
JBuilder8's JSP encoding problem
EL's encode