One of my jsp files [say X.jsp] is causing "exceeding the 655353 size limit in Tomcat 5.5"
So I splitted that large jsp file based on the no of lines...
I <jsp:include>d the splitted jsp files inside X.jsp instead of the original contents..
BUT THAT IS NOT WORKING..
Someone tell me "splitting a jsp file based on the num of lines and using <jsp:include> "is the right way to do ????
|
Go4Expert Member
|
|
| 26Jul2007,23:58 | #2 |
|
Hi banking on that question,
I found out that if u physically split the file like small files 1000 lines or files of say 100 kb, You must use < include > tag... |
|
Go4Expert Member
|
|
| 27Jul2007,00:03 | #3 |
|
But include tag doesn't serve the purpose .It physically includes the contents of the splitted files .Therefore during the main jsp file compilation,the error recurs saying:
SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 29 in the generated java file The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace: So I have to use jsp:include which means meaningfully splitting the file.. I need help here ... how to achieve this since the file contents change everytime.... I mean the jsp file is produced by some other machine which I have to process... I need a fool-proof mechanism whereby I can handle a large jsp file which itself changes ?? Please its an urgent requirement! |
|
Team Leader
|
![]() |
| 27Jul2007,10:05 | #4 |
|
You can split the file that way, you need to keep the Class source code in once piece! In .NET you can declare your class in fragments if you wish!
|
|
Go4Expert Member
|
|
| 27Jul2007,15:14 | #5 |
|
But that big jsp file is infact a javascript code!!!!!!
<% response.setContentType("application/x-javascript"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pramga", "no-cache"); %> sonefuntion(); O("200511","200511"); var mhArray=new Array( "ALL||ALL", "06||06" ,"1N||1N" ,"1X||1X" ,"1Y||1Y" ,"21||21" ,"30||30" ,"3C||3C" ,"4J||4J" } Many arrays are dclared in this file spanning thousands of lines ..... That's why the JSP is big !! SO,how to tackle this? |
|
Team Leader
|
![]() |
| 27Jul2007,15:32 | #6 |
|
Why declare so many arrays?? Keep the data in a database, and fetch & use as required!
|
|
Go4Expert Member
|
|
| 27Jul2007,15:38 | #7 |
|
Quote:
Originally Posted by pradeep i am a newbie! Can you please explain on that how to do !! Thanks, |
|
Team Leader
|
![]() |
| 27Jul2007,15:41 | #8 |
|
What are you storing in those arrays??
|
|
Team Leader
|
![]() |
| 27Jul2007,15:43 | #9 |
|
Will you have your breakfast,lunch & dinner just you need to have it! Likewise, load the data the data when required.
|
|
Go4Expert Member
|
|
| 27Jul2007,15:46 | #10 |
|
The jsp or js file contains various list box values....
The page which includes this file takes all the values and displays in the list box,,,, |

