This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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..