Ian Purton

Ian Purton’s Notes

Archive for February, 2006

  • Struts, UTF-8 and form submissions

    Struts will convert data that is received from form submissions to a default encoding because most browsers don’t set the content type.
    To stop struts mangling the data you need to set the content type with a filter before it gets as far as the struts layer.
    Use the filter below

    package filters;

    import java.io.IOException;
    import javax.servlet.*;

    public class UTF8Filter implements [...]

Subtraction Wordpress Theme by Ian Purton