Hallo,
I need do some code in processPreprocess 9setting characted encoding for data from forms), so I do as I read in Programing Struts book:


public class ExtActionServlet extends ActionServlet{

protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
System.out.println("Run processPreprocess .....");
try{
request.setCharacterEncoding("UTF-8");
}
catch(UnsupportedEncodingException e){
System.err.println("Unsuported encoding UTF-8: "+e.getMessage());
e.printStackTrace();
}


       return true;
   }
}

and modify my web.xml file to:
...
<servlet-name>action</servlet-name>
<servlet-class>cz.iccc.isspd.struts.framework.ExtActionServlet</servlet-class>
...

but it is not work, as I see in log, method is not executed (no message in log) and encoding is still bad.

What is the correct way?
Thanks, Jiri


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to