• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

jforum/admin,save Chinese incorrectly

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I use the functions of Admin,it can't save Chinese correctly.
for example:
url:jforum.page
action=editSave
module=adminCategories
category_name=中国

In jforum servlet,req.getParameter("category_name")="???",but when I use the functions of non-admin,such as createTopic,post,and so on,it can save Chinese correctly.

I think it might be related with 'enctype="multipart/form-data"'.If form has 'enctype="multipart/form-data"',it can save Chinese correctly,if it has not,save wrongly.

A few days ago,it all works well.I don't know why it fails now.
I have already set encoding=UTF-8.
 
xu yongqi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find the cause.
I integrated jforum with cas.So I added cas filter in web.xml,then request.getParameter() of Chinese parameter got wrongly.
Then I added a characterEnocdingFilter in web.xml,it included request.setCharacterEncoding("UTF-8")
characterEnocdingFilter is the first filter,cas filter is second,then is jforum own filter.
Now it works all right.
I don't understand why I must add characterEnocdingFilter if I add cas filter.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic