This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a JSP with the size 147kb. When it gets compiled the size is becoming 250kb. I am aware of that there can be 64k of code between try-catch block. But i can't split the jsp and have include one jsp into other, bcoz i am using the XML mapping for my jsp. Can any one please suggest me a solution to avoid the "code too large for try statement " Exception if i increse the JSP size even more.
The generic answer to this problem is to refactor your JSP to get any non markup code out of it. Understanding that this isn't always a small task that can be performed quickly enough to get your application up and running, the usual 'quick fix' is to break the JSP into smaller JSP action includes. If you can't do that, I'm not sure what else can be done.
Can you explain, why it is that you can't break your JSP up into actions in a little more detail?
Thanks for your response, Actually i am using XML mapping for every JSP, Depending on one of the field in that XML we are mapping the data to the data base. If i split that JSP, i have to maintain one more XML and updation of Database table will create Unit of transaction problem. Is there any way to make the weblogic server(weblogic 8.1) to compile the JSP in different try blocks instead of single big try block. (as in Tomcat 5.0, i can't use tomcat since projject requirements are like that).Can any one please suggest me the solution.