struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daigo Moriwaki <tec...@sgtpepper.net>
Subject Re[2]: CHARACTER ENCODING !
Date Thu, 24 Jan 2002 02:07:57 GMT
Hi, wojetk

2002/01/24 Thu  AM 05:53
"wojtek" <wojtekbe@box43.gnet.pl> wrote:

> I am also  setting         request.setCharacterEncoding("ISO-8859-2")  in
> every possible place !

Where did you put it?
You should put it before request parameters are copied into actoinForm
properties.

You can make a subclass of ActionServlet and put 'setCaracterEncoding'
in it like following:

// ----- sample subclass of ActionServlet -----
public class MyActionServlet extends ActionServlet {

	public MyActionServlet() {
		super();
	}
	
	protected void process(HttpServletRequest request,
	HttpServletResponse response)
		throws java.io.IOException,
		javax.servlet.ServletException {
	
		request.setCharacterEncoding("ISO-8859-2");
		super.process( request, response );
		
	}

}
// ----- end -----

The web.xml must be changed so that this subclass will be used:
	org.apache.struts.action.ActionServlet -->
	YOUR_PACKAGE.MyActionServlet


Thanks,
John Daigo Moriwaki

                             2002/01/24 Thu  AM 10:54
-- 
Daigo Moriwaki <techml@sgtpepper.net>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message