• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts1+Hibernate+Tomcat and encoding problem

 
Vladimir Riha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic