Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting encoding type of all the request parameters in a filter

 
Sankha Ray
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can you tell if it is possible to set the encoding type of all the request parameters in a filter.

The problem is that, i have created a j2ee project which deals with japanese characters.So,i need to use this
new String(value.getBytes("ISO-8859-1"), "UTF-8"); in my code whereever i am retrieving data from request objects
in order to display,update japanese values.Its a pain changing the code every here and there.

Can you comment on the possiblity of solving the issue with the help of filter?
A little hints on the approach will be enough.



 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think request.setCharacterEncoding() might help you, but i am not sure.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic