• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts1+Hibernate+Tomcat and encoding problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm trying to create simple application based on Struts1 and Hibernate on ApacheTomcat. But I have problem with saving words in utf8 encoding. I found some hints and so far I have this:
1) All JSP pages starts with

And in head I have meta tag

2) I created simple filter

And put this into web.xml:


3) I configured utf8 in hibernate.cfg.xml file:


Now I have simple form in jsp page with text input field. In my action class I used standard way to get value of the input field
and save it using hibernate. However it works only for some letters, others are save like "?". I'm using NetBeans and so I looked to its HTTP Monitor to see this request and all parameters and it seems to be encoded in windows-1250 so I tried to convert it by

But it is even worst because less letters are saved correctly and others are replaced by characters like .

Could anyone please help me? Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic