1 Reply Latest reply on Nov 6, 2012 2:57 AM by bondchan921

    http response get truncated in jboss-5.1.0.GA

    bondchan921

      Hi

       

      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

        • 1. Re: http response get truncated in jboss-5.1.0.GA
          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);

              }