• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP processing stopping in Weblogic server  RSS feed

 
Dion McMurtrie
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using weblogic server 5.1 and experiencing some problems with my jsp's apparently timimg out. We are developing on NT 4 and deploying to HP-UX and when we run our application on our local NT workstations it functions normally. But when we deploy to our dev HP-UX machine some (not all) of our JSPs get part way through sending data back to the browser and then just stop.
There is nothing in the server log to indicate something has happened, and when looking through page source actually delivered to the browser it looks fine but just stops halfway through. The strange part is that this all happens in about 2-3 seconds, so it is not like it is a long time.
Has anyone experienced anything like this before? Is there some sort of jsp timeout setting that I am missing?
 
Dion McMurtrie
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to post a question and then figure it out just after the post but we have a solution now. I thought I would post the answer so that if any other poor sod ran into the problem at least the solution would be somewhere...
It turned out to be the buffer size. Apparently the default buffer size is 8kb, and our bigger jsp's are up to about 16kb. So putting the line -
<%@ page buffer="18kb" %>
into the bigger jsp's solved our problem. Still doesn't answer why it worked on NT and not HP-UX - perhaps that is the difference between a developer NT version of weblogic and the full HP-UX version.
Hope this helps someone else in the future...
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dion McMurtrie:
It turned out to be the buffer size. Apparently the default buffer size is 8kb, and our bigger jsp's are up to about 16kb. So putting the line -
<%@ page buffer="18kb" %>
into the bigger jsp's solved our problem. Still doesn't answer why it worked on NT and not HP-UX - perhaps that is the difference between a developer NT version of weblogic and the full HP-UX version.

I've got a hard time believing this is all of the answer. The buffer does in no way restrict the size of your JSPs. When the buffer gets full, it's simply flushed (committed) to the client.
Really, it sounds as if there is a fundamental problem with your JSPs. For example, halfway down your JSP you could be doing something like trying to set the response headers. With an 8kb buffer, the response will have been committed and any attempt to set headers (directly or indirectly, e.g. sendRedirect) will cause an exception. This exception will abort the generation of your JSP, but because the response has been committed the browser is not redirected to an error page.
Increasing the buffer size is usually not the preferred solution (but sometimes inevitable).
- Peter
 
Dion McMurtrie
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you've got me.
All I can tell you is that it is a jsp that has an error page set that never executes HP-UX or NT. It calls a Java class and that class connects to an EJB. After that it performs a jsp include at which point another jsp (that is actually a very simple jsp) executes. It gets part way through the data that the included jsp spits out before it gives up (the include is actually at the end of the first jsp). No exception (I tried a try catch Throwable around the lot), the code is doing nothing to the request, response, session, headers - nothing, simply writing out HTML (javascript actually at that point).
It works fine on NT, and the jsps that write out more data then average (suspiciously only the ones that write more than 8kb) don't work on HP-UX unless I set the buffer size to ~18kb. If I set the buffer size on HP-UX they function exactly as they do on NT.
Has anyone come across this on weblogic server before? Or any other server for that matter?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!