dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: servlet error :65535 size limit reached

  1. #1
    Join Date
    May 2007
    Posts
    13

    Question servlet error :65535 size limit reached

    While loading a jsp page in Tomcat , I get this error:

    Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error:
    The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit"



    Anyone tell me how to overcome this:
    Plz consider this things

    a)this is the problem with tomcat,since weblogic is able to load the same page

    b)the jsp file is generated dynamically from other server.So size varies,unpredictable ::

    c)if u tell me to split the jsp file,plz anyone tell me how to do it(consider that jsp file is dynamic)

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    well the reason weblogic dont crash is that it might have set that limit to a larger number.
    If my memory is still ok then I think there could be a jvm flag to set to not inforce jsp compiled size limit. You will have to dig veeeeeery deep into tomcat documentation.
    Second if you can split jsp page, then look for the sections where you create html code in loops, and try to create separate jsp pages for such sections and just import them into your main jsp.
    Hope this helps
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    May 2007
    Posts
    13

    oc4j paramters

    as salaamu alaikkum Khalid,

    Thanks for the post... But I would like to know,how to set the JVM options.. i explored over the web.. I found one "by Configuring the command line parameters of OC4J Instance" ..

    -reduceTagCode
    boolean to specify further reduction in the size of generated code for custom tag usage

    -extres external_resource
    boolean to direct ojspc to generate an external resource file for static text from the .jsp file


    But I suspect it is oracle related and has nothing to do much in tomcat..

    please tell me if that can be applicable in tomcat..

  4. #4
    Join Date
    May 2007
    Posts
    13
    I tried to change memory settings by adjusting the
    Tomcat memory pool minimum and maximum setting values... but that doesn't work..

    can someone tell me
    if OC4J.jar( oracle jar file) be used in tomcat ... bcoz it has few parameters to finetune the jsp settings

    plz refr : http://download.oracle.com/docs/cd/A...rt.htm#1019100 for this.

    Thanks


    But i dont know if we can use here in tomcat ..if so HOW?

  5. #5
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    Quote Originally Posted by sakthi.abdullah
    as salaamu alaikkum Khalid,

    But I suspect it is oracle related and has nothing to do much in tomcat..
    .....
    Thats correct. The setting that I was referring to has to do with JVM for tomcat. If that is not an option then you will have to look into my second suggestion of breaking your jsp into several parts (<jsp:include>)and import them into the main page
    Last edited by Khalid Ali; 07-25-2007 at 07:51 PM.
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  6. #6
    Join Date
    May 2007
    Posts
    13

    Question splitting a jsp file -- what are the options?

    If there is no option except to split the jsp ....can u please tell me more about that ..

    The complexity here arises from splitting a dynamic JSP file ... I have identifed a few things from this jsp here..I suspect few lines like this cause the jsp file size to increase

    Array Name -- Start Line -- End line -- No of lines
    var xArray=new Array(" ") -- 1380 -- 3525 -- 2145
    var yArray=new Array(" ") -- 3525 -- 12302 -- 8777
    var zArray=new Array(" ") -- 12415 -- 21186 -- 8771
    var mArray=new Array(" ") -- 21192 -- 22697 -- 1505
    ---------

    Total No of lines ( for arrray declaration only) -- 21198

    So the arrary declaration itself spans a total of ~ 22K lines of code which is pretty large...

    At this point ...How to split the method ???array declaration wise (or) some x no of lines wise ..

    It ll be helpful if someone can give more ideas and if possible the code segment..

    Thanks
    Last edited by sakthi.abdullah; 07-26-2007 at 05:16 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles