• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Encoding problem

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic