You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghuveer <ra...@infotechsw.com> on 2008/06/24 13:44:30 UTC

Character encoding for http request - Configuration for complete application

I am working on I18N application.

To handle Http request and response in utf8 I have added following code in
my Actionform.

 

 

Is there way in struts to configure this for my complete application in
struts?

If it is normal servlet we can do this in init() method.

 

 

 

public void reset(ActionMapping mapping, HttpServletRequest request) {

 

            super.reset(mapping, request);

            //To reset all input fields

            try {

            request.setCharacterEncoding("UTF-8");

            }

            catch (UnsupportedEncodingException ex) {

            }

 

}// end of reset()