Re: 500 lines of jsp is 10k lines of java
I experienced the same problem with Weblogic 5.1 sp8. To fix it, I increased the initial heap and maximum heap size arguments for the Java VM in the Weblogic server startup BAT file to: -ms256m -mx256m This may be overkill for your situation, but it should work. "Kurt Olsen" kolsen@get2hTo: [EMAIL PROTECTED] awaii.com cc: (bcc: Todd Malvoso/GRS/GRN) Subject: 500 lines of jsp is 10k lines of java 03/19/01 01:03 PM Please respond to struts-user Hi everybody, I'm fighting a problem whereby the java code generated by a 500 line jsp file is so large (10,200) lines that a try/catch block contains so much code that the file won't compile, giving a msg saying something like 'jump target out of range'... Surely I'm not the first to deal with this (and it's a real show-stopper). Anybody know a way to deal with this (other that hand editing the source-code)? This isn't a struts problem per-se but it's being interpreted that way by the powers that be where I work. Not good! Later, Kurt -Original Message- From: Kyle Robinson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 7:36 AM To: Struts (E-mail) Subject: Locales and images I understand Struts has support for makeing web apps available in different languages. Does this include images? If I have images with text on them in English can I make images with text in French as well? Do I name the image files differently or do I have to include the paths to the images in the property files? Has anyone done this? What's the best approach? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Illegal target of jump or branch Error
Thank you for your explanations. As a result I changed the -ms and -mx options for the Java VM to request 256 MB of heap memory...and it worked. "D'Orto, David" To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] DOrto@Bluestcc: (bcc: Todd Malvoso/GRS/GRN) one.com Subject: RE: "Illegal target of jump or branch" Error 02/07/01 09:05 AM Please respond to struts-user I have also seen this problem when a jsp was being compiled that had a lot of struts tags in it (like 250 or so). I also believe it has to do with the method that is generated when the jsp is compiled being too large. When I took the class that was generated by Tomcat for the page and compile it on the command line, I get the 64kb limit exception. I do not know why the "Illegal target of jump or branch" error gets thrown in Tomcat as opposed to the 64kb limit exception. Dave D'Orto [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 5:48 AM To: [EMAIL PROTECTED] Subject: Re: "Illegal target of jump or branch" Error I think this is due to hitting the 64kb limit in a class file (a 16bit offset for the byte code in a method). I had similar problems using Jasper. I managed to refactor the page so that the number of actual tags was reduced (put a loop in it, so the tags were called multiple times). Using scriptlets (!) can also help significantly... or if you can afford the flush, use jsp:include (roll on JSP 1.2). [EMAIL PROTECTED] on 07/02/2001 06:59:08 Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Ken X Horn) Subject: Re: "Illegal target of jump or branch" Error Interesting. A colleague of mine started seeing exactly the same problem today, but with Resin instead of WebLogic. I had never seen it before. It seems, on the face of it, to have something to do with the complexity of the page. The page we were having problems with has a boatload of custom tags on it (some Struts, others our own). When we commented out a sizeable number of those tags, it started working again. Which particular chunk of tags we removed did not make a difference, which is what led me to believe it was related to page complexity. However, that's as far as I've got. I'd be very interested in hearing the "real" reason behind this error, as well as what we might be able to do about it. -- Martin Cooper Tumbleweed Communications - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 06, 2001 8:00 AM Subject: HELP: "Illegal target of jump or branch" Error I receive the following error when accessing my JSP in WebLogic 5.1 (sp8): Tue Feb 06 10:56:07 EST 2001:E WebAppServletContext-smartforms Servlet failed with Exception java.lang.VerifyError: (class: jsp_servlet/_test, method: _jspService signature: (Ljavax/servlet/htt p/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java :431) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja va, Compiled Code) at
HELP: Illegal target of jump or branch Error
I receive the following error when accessing my JSP in WebLogic 5.1 (sp8): Tue Feb 06 10:56:07 EST 2001:E WebAppServletContext-smartforms Servlet failed with Exception java.lang.VerifyError: (class: jsp_servlet/_test, method: _jspService signature: (Ljavax/servlet/htt p/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:431) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:404) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:228) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:101) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java: 252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code) The same call in Tomcat is successful. Does anyone know what causes this error?
Tag Library Definition Inheritence
Just as functionality can be inherited as you subclass the tag handlers, is it also possible to inherit the corresponding tag interface definitions in the library file? The TLD files are growing unnecessarily large. Thanks.
Help Please: Resource not found
When trying to call a JSP I receive the following message from Tomcat: javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) I checked the STRUTS distribution and did not find it. Has anyone encountered this before? Thanks.