I'm working in a project which is multilingual supported. The application has facliity to display the pages in different languages as well as can save data written in different languages. App user needs to choose the language at the login time and application will store his language preference in session variable. I'm using struts 1.2 as development framework and Oracle 10g as DB.
Displaying pages in different languages is working perfectly. But when I'm trying to retrieve data written in different language in my form other than English, like Hindi, Oriya, Bengali etc, then in action form it's coming as garbage. The problematic thing is I've tried this using normal JSP and Servlet and it's working correctly. When I'm using struts <html:form> and <html:text> instade of <form> and <input type="text"> data coming as garbage.
So can anyone give any clue to solve the problem ? My JSP and Action class are given below :
Struts doesnt implement the HTML "<input type="text">" it just render it, understanding <html:text> stands for "input type=text". There should not be any problem with struts as long as your character encoding is supported. However, struts doesnt handle the direct request parameters and attributes since you are not using struts over there. For example like in line number 21,22 - request.getAttribute("COMMENTS") request.getParameter("COMMENTS") etc.. try avoiding these types for data transfer instead use form beans to let struts do everything for you and it should work fine.
Have Fun with Java
little,little.. little by little makes a lot..
Joined: Apr 23, 2008
Please let me know the below details,
1. Oracle 10g - character set ??
2. Which SERVER you have deployed the below application
JSP & SERVLET application... server ??
STRUTS Application..... server ??
3. which browser you are using ?
4. Are you using any open source framework... like Liferay ???