Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a maximum size for a JSP?

 
Katie McCann
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am about to pound my head against a wall! I have an HTML page that will be converted to a JSP. The HTML has some pretty complex tables and the code is pretty long (about 25 pages printed out). I've changed the extension to .jsp and am trying to run it with Apache / Jrun 2.3. I am getting the following error:
500 Internal Server Error
com.livesoftware.jsp.JSPServlet:
javax.servlet.ServletException: java.lang.ArrayIndexOutOfBoundsException
It is purely HTML code at the moment- no JSP tags at all. I have been cutting and pasting code for about 2 hours trying to figure out something that is causing this exception. I'll cut the HTML code down to bare minimum, everything works fine. Add some more of the HTML back in, works fine... etc. etc. until eventually I add some additional HTML and I get the above exception. Aha!, I think- the error is being caused by the code I just added in. But no- I delete all the HTML except the most recent code that I just added in, and suddenly it works fine again.
So basically, I'm baffled. The only conclusing I can draw from the above scenario is that there is some sort of limit to the size of the JSP file. Of course, I can't find a reference to this anywhere. Anyone have any idea what the deal is?
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
In JSP,at some point, such as when the buffer is full or the end of the page is reached, the container sends all headers that have been set followed by the buffered body content. The default buffer size is 8KB, more than enough for a typical page, and you can increase it with the buffer attribute of the page directive.
Anil.
 
Katie McCann
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried increasing the buffer size, but am still getting the same Exception as above. Any other ideas?
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Katie,
Did you try with 'autoflush' page attribute? The default seems to be 'true' for the 'atutoflush' attribute . Just to make sure try with the following code. If it still raises an exception try with bigger size. Actaully the buffer size shouldn't matter when we say autoflush=true I think. Because, it merely means as and when the ' out' buffer reaches the specified size, the content is flushed to the browser.
Also note that autoflush = "false" is illegal when buffer=none.

regds
maha anna

[This message has been edited by maha anna (edited November 29, 2000).]
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing to checkout is the default buffer size- this is server dependent- there is no standard default buffer size- contact the vendor to find out the buffer size for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic