You can subclass action servlet:


import org.apache.struts.action.ActionServlet;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;

public class LADActionServlet extends ActionServlet
{
    protected void process(HttpServletRequest p0, HttpServletResponse p1) throws 
IOException,ServletException
    {
        String enc = this.getServletConfig().getInitParameter("requestEncoding");
        if(enc != null && enc.trim().length() > 0)
        {
            p0.setCharacterEncoding(enc);
        }
        super.process(p0, p1);
    }
}


refer encoding in web.xml like this

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>lv.datapro.lad.pri.actions.LADActionServlet</servlet-class>
...
    <init-param>
      <param-name>requestEncoding</param-name>
      <param-value>windows-1257</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>


regards
Maris Orbidans

> -----Original Message-----
> From: Eric Chow [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 21, 2002 4:55 AM
> To: [EMAIL PROTECTED]
> Subject: Character set problem
> 
> 
> Hello,
> 
> Is it possible force the Action or ActionForm to use
> req.setCharacterEncoding() before it capturing data or
> put all the form data in ActionForm ??
> 
> Best rgards,
> Eric
> 
> 
> =====
> ==========================================================
>  Chow Hoi Ka, Eric
>  Email : [EMAIL PROTECTED]
> 
>  - If you know what you are doing,
>  - it is not called RESEARCH.
> ==========================================================
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to