click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Finn Bock <>
Subject Setting character encoding on individual pages.
Date Fri, 18 Jun 2010 19:21:09 GMT

Normally I use UTF-8 for the request character encoding, but a few
pages needs to accept requests from other systems that uses a
different encoding for request parameters. I can achieve that by
setting the character encoding in the page constructor or doing it in
a page-interceptors preCreate() method.

Except when the application is running in TRACE mode due to the
logging at the beginning of ClickServlet.createPage(context):

        // Log request parameters
        if (logger.isTraceEnabled()) {
            logger.trace("   is Ajax request: " + context.isAjaxRequest());

since access to parameters means that subsequent changes to the
character encoding is ignored.

Would it by reasonable to move the logRequestParameters() call down to
after the pageinterceptor.preCreate() call?


View raw message