Help coderanch get a
new server
by contributing to the fundraiser

Matt Holloway

Ranch Hand
+ Follow
since Oct 16, 2003
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matt Holloway

I'm very interested in the use of Flex for the UI with Java as the server side. Do you cover using Spring integration with Flex? How about Grails? Also, what IDE setup do you cover in the book? I'd like to see development options with opensource rather than having to purchase Flex Builder from Adobe.
14 years ago
I'm not sure if this is the right forum, but here is what I'm trying (and failing) to do:

I'm using the Spring framework in a Java application. I need to load the application context and a properties file, but I cannot find the files when I run the app.

I have tried using the FileSystemResource("filename"), but it never finds the file... what path is used by default when this "filename" is attempted to load? I don't want to have to put "c:\temp\filename", since this will force the file to always be in "c:\temp", rather, it should be relative path... I have also tried packaging the classes in a jar, and using ClassPathResource("filename"), with the same results.

P.S. I'm trying to debug with Eclipse... if that makes a difference.
16 years ago
I'm not sure if this is 'Intermediate' or 'Beginner', but here goes.

How does a person go about setting up the JVM memory? (Is this specific to the App Server that you are running, in a config file, or is there a global way to set it?).

I'm installing SAP NetWeaver, and it needs the JVM memory set to 1024, it is currently at 512...

Thanks... in advance.
18 years ago
Okay... duh... I'm a fool. For SOME reason, I was pumping the direct JSP name into the url path, not the servlet mapping name.

It works now.
18 years ago
Well, according to page 372 of HFS&J, the servlet contains the code (slightly modified to music instead of food):

And in the JSP, you simply do the following to ouput the entire ArrayList:

or, to output a specific value:

But nothing prints out (other than "Music is:")
How do I actually 'tie' the JSP to that servlet... how does EL know which servlet has "musicList" in it?
[ March 10, 2006: Message edited by: Matt Holloway ]
18 years ago
I have EL working in that when I create a JavaBean, I can put out the value as in ${} prints out "Matt". The problem I'm having is getting EL to work with an ArrayList that exists in a java class... do I have to do something in the DD file to get this to work? How does the EL know what I'm talking about if I say ${movieList} that I mean an ArrayList that contains my movies?

I tried this with a servlet using the request.setAttribute("musicList", favoriteMusic); - but no output...

P.S. In case it is not obvious, I'm going through the HeadFirst Servlets and JSP book.

18 years ago
I'm wondering if there are any client side performance issues with AJAX due to the client side scripting.

What I'm getting at here is the use of AJAX in a terminal services environment, if all of the client side scripting is taking place on a terminal server, would that not eventually bog down the terminal server?
I'm new to WebSphere (shiny new), and I am attempting to deploy WCM 2.0 on it, the instructions in WCM say to 'put' the WCM files in a folder on the server, what location in the WAS folder structure do I put the files in?

I'm familiar with deploying apps on JBoss, Tomcat, WebLogic, but new to WebSphere. I'm not really going to be working with WAS (other than through the deployment of WCM, which is what I am going to be working with).

The WCM doc says to create the folder, then in the web.xml file, rename [wcm_home] to the folder location.

18 years ago
I got the Head First EJB Book to try to learn EJB. The problem I have is in the Intro with the example application. I have downloaded the Sun Application Server PE 8 for use with this book. I followed the example step by step, and everything seemed fine (the new deploy tool had a few differences, but the J2EE validator showed no errors, and kicked back the client jar). The problem I have is when I write the client app and try to get back the Advice...

Problem 1:
When I compile the source using

I get all kinds of errors saying it couldn't find packages. I then added the AdviceAppClient.jar to my classpath environment variable, and compiled the java source for the client (no errors).
Problem 2:
When I run the AdviceClient.class file with the method suggested in the book, I get an error

Problem 3:
When I run the AdviceClient.class file without the -cp, I get a different error

Has anyone else encountered these issues? Am I doing something really dumb here? I have found the Head First books good in the past (I have used the Head First Servlets and JSP book, as well as the Head First Design Patterns).
Thanks. I tried, and both examples you gave worked. It seems as though I was mixing stuff up... I was going from the JSTL spec from the Sun website that I downloaded, and I'm pretty new at JSTL, and about to embark on learning JSF, so that didn't help my case. I'm making an effort to put together scriptless JSPs so that the person who maintains them doesn't come to my house and kill me for using scripts that they don't understand.

I think the key thing I was missing was the <c ut>.

Thanks for the help.
18 years ago
I tried with the $ as well, it is not outputting anything. I don't get any errors in the log.

I inserted 'test' into the <td> element in the forEach loop, and it iterated through the correct number of times for the list, but does not put out any of the data from the object in the list.
[ November 06, 2005: Message edited by: Matt Holloway ]
18 years ago
P.S. I've also tried doing a #{product.prodName} with the same result (i.e. no data returns)
18 years ago
I'm using Hibernate to insert/select data from a database. I have a JavaBean class 'Product' that has the getters/setters that Hibernate uses to insert and get data with. My problem is, when I get the data back from Hibernate, I create a list to store the records in, then pass that list back to the JSP as an attribute. I can iterate through the list using scripting in my JSP, but I'm trying to maintain scriptless JSPs, so I would prefer to use EL and Standard Actions. Is there a way (short of creating a custom taglib) to convert the following to a scriptless JSP?

Here is my (lame) attempt with EL:

I'm attempting to run the getProdName method to return the prodName...
[ November 06, 2005: Message edited by: Bear Bibeault ]
18 years ago
Okay... I figured it out, here is the fix in case anybody else runs into this.

In the <%tomcat_home%>\bin folder, there is a file called setclasspath.bat, if you add the path to the MySQL jar file, save the file then stop/restart tomcat, it will work.

<%tomcat_home%> is the folder path to your tomcat install
[ February 27, 2005: Message edited by: Matt Holloway ]
I know this seems to have to do with my CLASSPATH...

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

I have a MySQL database setup. When I use Eclipse, I can perform the following:

and all goes well, I can then connect to the database, yada, yada..

When I use NetBeans, the same code gives the above error... What I am really trying to accomplish is to make this connection in a JSP page running on TomCat 5.2... I have put the jar file from MySQL in the web-inf folder just in case that might help, but nope.

Any help would be appreciated.