Prev: java.net.SocketException: No buffer space available (maximum connections reached?): recv failed
Next: DuplicateHomeNameException
From: jan V on 5 Sep 2005 17:54 "Jimi Hullegýrd" <ask_for_real_email(a)nothotmail.com> wrote in message news:eEZSe.30543$hV3.12466(a)nntpserver.swip.net... > "Aj-India" <ajitravindran(a)gmail.com> wrote in message > news:1125934051.843610.224970(a)g14g2000cwa.googlegroups.com... > > Hi, > > I am using JSP. I got this error" The code of method > > _jspService(javax.servlet.http.HttpServletRequest, > > javax.servlet.http.HttpServletResponse) is exceeding the 65535 bytes > > limit ". Is there any way around this? I am now in a position that I > > cannot reduce my number of lines of code. > > Apparently this is a limit in the java language. To be more precise, it's a limit in the JVM. So other languages which also compile bytecode for the JVM will have the same limit.
From: Roedy Green on 5 Sep 2005 19:26 On Mon, 5 Sep 2005 22:40:48 +0200, "Robert Klemme" <bob.news(a)gmx.net> wrote or quoted : > Try using <jsp:include> Is JSP include just a macro text include? If so the size of the generated class file would be the same. -- Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
From: Jimi Hulleg?rd on 5 Sep 2005 21:13 "Roedy Green" <look-on(a)mindprod.com.invalid> wrote in message news:dvkph1plkjma0n3tgt0p51arddeobpj22c(a)4ax.com... > On Mon, 5 Sep 2005 22:40:48 +0200, "Robert Klemme" <bob.news(a)gmx.net> > wrote or quoted : > >> Try using <jsp:include> > > Is JSP include just a macro text include? If so the size of the > generated class file would be the same. No. The <%@ include file="page.jsp" %> tag does that (static include). A <jsp:include page="page.jsp"> is executed at run time, and really only inserts the _result_ of that page. In the compiled jsp-file it looks like this in an test I just made: org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "page.jsp", out, false); /Jimi
From: Thomas Hawtin on 5 Sep 2005 21:15 Roedy Green wrote: > > There is no way you could write a fatter method since the class file > jump offsets are 16 bits in a method. The class file format actually does allow larger methods. jsr_w and goto_w are there to support 32-bit jumps. A little dance is required to generate the opposite if opcode branching over a goto_w. However, debugging information and try/synchronized blocks cannot be created for code beyond the sixteen bits. http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#88659 A sufficiently good compiler could fiddle it. I believe Java SE 6 will have a revised format that allows larger indexes. > Build the method directly in byte code, where perhaps you can be more > efficient than JavaC. See http://mindprod.com/jgloss/jasm.html Now that's a step back from JSP. Tom Hawtin -- Unemployed English Java programmer http://jroller.com/page/tackline/
From: Roedy Green on 5 Sep 2005 21:54
On Tue, 06 Sep 2005 02:15:01 +0100, Thomas Hawtin <usenet(a)tackline.plus.com> wrote or quoted : >Now that's a step back from JSP. I am assuming he is generating the JSP. I find it hard to imagine anyone hand writing a single 64K java method. It then becomes not that big a difference sometimes to generate JSP, Java or byte code depending on just how regular what you are generating is. We have been dropping lots of hints, but OP does not seem willing to share what he is doing . -- Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts. |