开发者

Browser show incomplete JSP data

开发者 https://www.devze.com 2022-12-23 20:47 出处:网络
I am using JSP, Struts 1.3 and Apache Tomcat 5.5. For some reason response from JSP is being truncated and complete information is not shown.

I am using JSP, Struts 1.3 and Apache Tomcat 5.5. For some reason response from JSP is being truncated and complete information is not shown. Class generated from the problem JSP page looks just fine. There are no any errors logged in Catalina's logs. I have no idea how this issue can be fixed.

Update: I'm sure that I'm looking in the right log for errors ($CATALINA_HOME/logs). Besides I'm writing some log messages to custom log file. There are no any mentions about this error in both of them. Error happens only in one specific page and cont开发者_如何转开发ent is truncated in the same place. If I print the same entity few times page output looks perfect. If I remove some outputs before this place the cut border is shifted: Memory allocation issues? Page buffer size doesn't effect on page output, I've checked. In this page I use include directive and I've met some information that if the size of generated servlet exceeds 64 KB, your JSP compilation will likely fail. Servlet generated just fine and I'm stuck.


As per your update:

If I remove some outputs before this place the cut border is shifted

It look like that something went wrong during closing the outputstream. I'd check the entire filter chain if there isn't some filter which replaces the HttpServletResponse with a custom implementation which in turn is poorly implemented, e.g. it doesn't properly delegate the close() method to the 'original' outputstream/writer. Try disabling the filter and retest it. Also try to add the following line to the bottom of the JSP to see if it fixes the problem:

<% response.getWriter().flush(); %>


I've had the similar problem Where Only part of the JSP file is displayed(downloaded) in the Browser(Debugger/Pagesource). The worrying part was that it wasn't always happening.

I found that there was an NullPointerException being thrown because of a connection Timeout which ultimately was responsible for Sending only part of JSP back by the Server.

So, as advised in the comments by others, do look into your logs properly.

0

精彩评论

暂无评论...
验证码 换一张
取 消