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 ????
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...
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!
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!
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?
Will you have your breakfast,lunch & dinner just you need to have it! Likewise, load the data the data when required.
"Values for list boxes in a web page" 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,,,,
Create database tables accordingly and store the data there. Say, you have to show categories, so create a table for categories and store the data there, and when you need to display it fetch it from the database and output as required!
Tha complexity lies in the fact::: That js[p] file is genrated from another machine every night,I have to load that dynamic file .... Everytime the size varies,it may be less or more