-
1. Re: http response get truncated in jboss-5.1.0.GA
bondchan921 Nov 6, 2012 2:57 AM (in response to bondchan921)this solution works for me, should be caused by encoding issue, despite not found any special char now
https://community.jboss.org/message/764827#764827
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);
}