Search code examples
htmlapachetomcattomcat7tomcat8

Tomcat7 -> Tomcat8 - Server just prints half of the html page


I have a very weird problem:

I upgraded from Tomcat 7 and Java 7 to Tomcat 8 and Java 8. The webapp is called ROOT.war, so that the servlet "Index" gets activated.

When I go to www.myurl.com, the server just prints half of the html page, but when I go to www.myurl.com/Index, it print the full page. But this is the same Servlet, very weird! In Tomcat 7 and Java 7 it worked without problem.

The code where it breaks is just text:

            "                            <br />\r\n" + 
            "                            <br />\r\n" + 
            "                            <font size=\"2\" color=\"#000000\"><b>just text 1.\r\n" + 
            "                            just text 2.</b></font>\r\n" + 
            "                            <br />\r\n" + 

In my browser "just text 1." is the last line, but there should be 200more lines.

Does someone has a idea? This is so weird because the same servlet works with www.myurl.com/Index and not with www.myurl.com.


Solution

  • You are not saying what version of Tomcat you use.

    There is a bug in 8.0.17 that causes responses after <jsp:forward> to be truncated. It was noted a day after release. (link 1, link 2)