Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP limit exceeds 64K  RSS feed

 
mohammad shadab
Ranch Hand
Posts: 62
Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I am aware in java there is a method size limit 64k , I want to know is there any workaround for this problem . My JSP does not contain any static include . I am running with tomcat 8.5 version . It does well on lower versions of Tomcat.
I have tried changing web.xml available inside tomcat's conf directory , Following are the tags i havce used. Did java 8 change any thing in JVM or Tomcat Container got changed  any thing while translating JSP ? Because same code runs well with java 7 along with Tomcat 7.
 
Tim Moores
Saloon Keeper
Posts: 3755
78
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a JSP is that big, it's likely to be unmaintainable - break it down into smaller chunks. If there is a lot of repetition, see if you can create custom JSP tags.

And, of course, if there is any Java code in it, get rid of it in favor of a proper MVC design.
 
Dave Tolls
Ranch Hand
Posts: 2721
30
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim's second paragraph is possibly the key here.
The only times I've seen this limit hit in a JSP is because there was a lot of Java code on the page.
 
I've never won anything before. Not even a tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!