This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Michael Beck

Greenhorn
+ Follow
since Mar 11, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Beck

thank for the move, but this isn't a struts issue. after further research, the problem seems to be that the servlet container (WAS) is this instance compiles the jsp into a java file in which all of the code is contained within a try/catch block.

from http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was.doc/html/Java_SDK/1177375.html

The Java� specification states that there is a 64 K limit on the size of methods in Java. The JVM� does not execute methods that exceed this limit.

It is possible to compile methods larger than 64 K, but the JVM will not run these methods. Consequently, the error occurs during runtime, while attempting to execute Java methods that are greater than 64 K.

A code too large for try statement error can still be issued while compiling a JSP. The compiler limitation does not allow try/catch blocks to have a start or end location greater than 64 K into the method code. Therefore, compiler limitations are usually caught when a try/catch block overlaps the 64 K boundary.
12 years ago
I ran into a baffling problem yesterday with a jsp. Using the struts tag library, I had a logic:iterate over a large block of code that displays a lot of data which also had some iterates in side of it. Upon trying run the page on a WAS server, I got the compile error "unable to compile class for jsp...code too large for try statement..."
Apparently the struts logic tag generates a try/catch statement when the java class is compiled. I solved the problem by getting rid of the logic:iterate tag and using a scriptlet to iterate over the code.

Has anyone seen this before, or have any insight into why this is the case?

Thanks in advance.
12 years ago
you're correct - this does work just fine. thanks for your help
12 years ago
So, following my example list above, would this be the appropriate HTML source code to populate a field on my bean?

<input type="text" name="property3.fieldName" />

When I have an array of these objects and define the form-property type as "java.util.List" and the html is indexed properties it works fine

for example:

<input type="text" name="property3[0].fieldName" />

but the first example doesn't seem to work. Is that how the html would look for the form field name?
12 years ago
Can I use an object of my own (bean) as a property type on a dynaform? For example -



Please see my 3rd property. Is this possible?
12 years ago
I am trying to model a quiz. I create a Quiz object. There are 4 different types of Quiz. Each quiz needs to calculate results...therefore each of the 4 Quiz objects should have a calculate() method. Because each has to have this method, I thought I would create either an abstract class or interface Quiz and have a calculate method that would need to be defined in each of the concrete class. The problem though is that for the calculate methods the parameter passed would be of a different type in certain cases. In 2 cases I want to pass in a List and in another case I pass in a Map object. Since the parameters are different I can't define the method in the superclass, unless in the superclass I define the parameter as Object. Is this the way to go or is this not a case for using inheritance?

Thanks.
14 years ago
I've discovered that j2ee.jar is unnecessary. jta1.0.1.jar
includes the required interfaces. the jar is in
the lib directory of the full castor download.
14 years ago
I think I figured out why it can't find the class. I am using castor-jdo to do object/database mapping with a mysql database. Castor-jdo uses a class javax.transaction.Synchronization...it doesn't seem to work without this. This class is in j2ee.jar
When I start my webapp I see
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ahs96\WEB-INF\lib\j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

So j2ee.jar never gets loaded when it is in my webapp. It only gets loaded if I put it in the $CATALINA_HOME/common/lib directory.

The problem is I need this class for the castor stuff to work. It 'does' work putting it in $CATALINA_HOME/common/lib directory. but this is not the right way to do it. Can anyone give me some insight into this?

Thanks
14 years ago
why wouldn't your JRE path just be "C:\Program Files\Java\jre1.5.0_04"?
14 years ago
Do I need to do anything with any of the files in the /conf directory to define my web app context? I wonder if thats why those files aren't in the classpath.
14 years ago
yes, it is a jdbc class that cant be found. i'm using castor-jdo to connect to a mysql database so this wouldn't be container managed (unless i'm confused about what container managed is)
14 years ago
there are multiple .jars including castor-jdo jars, commons classes, mysql connector, xml parsers etc...so yes, they are in packages within the .jars
14 years ago
I've searched the forums and seen this question asked, but there doesn't seem to be an answer to it. I deployed a webapp of mine to tomcat 5.5 as a .war file. The deployment works and I can call jsps. I try to call a servlet which uses a .jar file which is in my application's /WEB-INF/lib/ directory.
I get a NoClassDefFoundError for a class that the servlet tries to call. However, if I add my .jar file to $tomcat-home/common/lib everything works fine. I can't imagine I would need to add all my .jar files to the common/lib to get them to work. Please let me know what I need to do to have the files in my own application's \WEB-INF\lib directory to be seen.

Thanks in advance.
14 years ago
are some of these cheap SSL certificates legit? some sites offer these. http://www.ssl-certificates.us/ says $99 per year...www.completeweb.com says $29 per year. the ones from verisign etc cost like $900 per year...what is the catch?
15 years ago
I'm not sure what area to post this in, so hopefully it can be moved if there is a better place.

Does anyone have a good suggestion for a hosting place for a struts application that will use a mySql database? This is for a small business that will not be getting large volumes...Maybe 50 visits per day to start, probably a couple hundred visits per day later, less than a thousand in the future.

Also, somewhat related, I've never understood the process of how you get your domain name on a certain box hooked up to that IP address. I mean, I have the domain name registered, say I wanted to host out of my house and have a static ip address, how is this set up?

Thanks for any replies.
15 years ago