0

1)I have a quite strange issue, the http response get truncated, the source file get from web browser of this jsp keep the size of 114458 bytes no mater how do I change the content of the jsp source, I have do quite a lot of research on it, but no luck so far.

2)Found 2 similar issue from the internet, but not work for me a) response get truncate when encounter special char, (https://community.jboss.org/message/497765#497765), I have try the workaround provided and comment the include statement to exclude a jsp having special char

b)JSP's are reaching the 65k-boundary (http://www.tikalk.com/java/migrating-your-application-jboss-4x-jboss-5x), still not work by changing the config provide inside

3)I have try the EAP version(jboss-eap.5.1.2) no this issue

Bond Chen
  • 168
  • 1
  • 8

1 Answers1

0

this solution works for me:

https://community.jboss.org/message/764827#764827

add a filter

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    HttpServletRequest req = (HttpServletRequest) request;
    HttpServletResponse res = (HttpServletResponse) response;

    if (inUse && this.encodingConfig != null) {
        req.setCharacterEncoding(encodingConfig);
        res.setCharacterEncoding(encodingConfig);
        //res.setHeader("Content-Type", "text/html;charset=" + encodingConfig);
        //res.setContentType("text/html;charset=" + encodingConfig);
        if (System.getProperty(DEFAULT_ENCODING) == null) {
            System.setProperty(DEFAULT_ENCODING, encodingConfig);
        }
    }
    chain.doFilter(req, res);
}
Bond Chen
  • 168
  • 1
  • 8