Forum Stats

  • 3,815,606 Users
  • 2,259,059 Discussions


JSP rendering HTML source code occasionally

893088 Member Posts: 1
edited Oct 11, 2011 4:00AM in JavaServer Pages (JSP) and JSTL
I have project deployed on JBoss423 server. Sometimes while accessing a jsp page i am seeing the html source. I have already tried including the 'meta http-equiv="content-type" content="text/html; charset=utf-8"' and <%@ page contentType="text/html; charset=UTF-8" %> tags but still the error seems to not resolved. After the error comes if i refresh the page it works perfectly.

I am not able to find a genuine solution to this problem. The error is occurring on IE9 as well as firefox 7.0.1. I am not seeing this error when i use IE8.


  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    The fact that you see the html source has nothing to do with your server-side resources directly; its the browser that for some reason is unwilling to render the actual content. This might mean that occasionally your markup is faulty enough that the browser doesn't comply; generally this happens when an exception occurs after content has already been flushed to the browser. This cuts the HTML content short. It could also be an improperly closed string text in the content, or a missing closing tag.

    When it happens again, examine the actual HTML content and the server logs to see if there is something odd in there.
This discussion has been closed.