Help coderanch get a
new server
by contributing to the fundraiser

Nicole Lacoste

Ranch Hand
+ Follow
since Oct 04, 2006
Merit badge: grant badges
For More
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 Nicole Lacoste

Hi Charles (and anyone else with an opinion to share)

I was studying for the SCWCD exam when I had to put that aside to learn Grails and GWT for a work project. Now a few months later I am having a really hard time coming back to my SCWCD studies. It seems like there are just so many options (web frameworks) that hide all those pesky details of developing a web app, especially developing custom tablibs. I’m sure you feel it is worth knowing all the foundation knowledge, or you wouldn’t have written the book, so I’d really love to hear your thoughts on this.

Also I have been using the Head First book, and although I loved the Head First style for design patterns (after years of reading the GOF I finally understood !) But for servlets/JSP I find it a bit too repetitive. What’s your style? Is your book a bit more concise / serious?

Nicole
Congrats to the winners! I just ordered myself a copy on Amazon, at least they weren't sold out!

Nicole
15 years ago
Well that settles it, if I don't win it I'm buying it!

Thanks Peter,

Nicole
15 years ago
Hi,

I would like to know if this book requires prior Groovy knowledge? I am a relatively seasoned Java Dev, with only the vaguest notions of Groovy. Will this book bring me up to speed on Groovy, or at least all the bits of Groovy that Grails uses? Or should I read a Groovy book before hand? And if so any suggestions? Groovy in Action seems to be the market leader.

Thanks,

Nicole
15 years ago
Thanks!

I suspect that the differences in 1.0 and 1.1.1 aren't as significant as they feel to me. I am blindly following the tutorial, without knowing why the syntax is the way it is. I think if I knew some groovy it could help...


Nicole
15 years ago
Hi

I've recently started to learn Grails using the Mastering Grails series on developerWorks. Its not bad for a first look, but I am ready for something a little more thorough. I am thinking about buying the book Grails in Action (if I don't win one on JavaRanch!). Another problem with the Mastering Grails series is it is not up to date. It was written for Grails 1.0 and I have Grails 1.1.1. I am surprised at the extent of the differences. What version of Grails does the book use? I looked on Amazon to find out, but could find the info.

Thanks,

Nicole
15 years ago
Hi,

I am trying to test a servlet that expects a file to be uploaded. The request's content type is multipart/form-data. In my unit test I am using HttpUnit and here follows my code...



Everytime I try to run it I get the error that "the request because no multipart boundry was found".

Has anyone succeed in using HttpUnit to test file upload on a HttpServlet and can give me some advice?

Thanks,

Nicole
16 years ago
Hi

You could try using a CompletionService. I've never done this just read about it in Java Concurrency in Practice by Goetz. To quote Goetz, "CompletionService combines the functionality of an Executor and a BlockingQueue. You can submitt Callable tasks to it for execution and use the queue-like methods take and poll to retieve completed results, packaged as futures, as they are available".

Take a look at the java docs for the completion service.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/CompletionService.html

Nicole
Thanks Ben,

I am working on it. First of all I noticed that in an normal app (not Tomcat) I can call System.loadLibrary() serveral times in a row with the same dll with no exceptions or complaints. I haven't yet tested under Tomcat. Also you said (or quoted)

To avoid this problem, place classes that load native libraries outside of the web application, and ensure that the loadLibrary() call is executed only once during the lifetime of a particular JVM.



How?

Nicole
16 years ago
Hi

I was just reading through some of the posts, and came across this topic.

I find this really disturbing. It's annoying that generics can't be uses in overloads, but at least I understand type erasure and have come to live with that. But I just can't get my head around the fact that changing the return type makes it work, since this isn't the case for over loading in general, ie.

will not compile.
As you state

doesn't compile due to type erasure but it is true that

does compile, and not only that it works! Calling method with a calls the first method and calling it with a collection calls the second.

Anyone else as disturbed as me? Or is there some explaination?

Cheeers,

Nicole
16 years ago
Hi All,

I have a webapp that uses dlls and I have two questions about this.

1. Is there anyway to put the dlls in the war and have Tomcat find them. BTW there are 8 dlls, and one uses the others. For the moment I have the dlls in the bin of Tomcat (or on the path), and that works OK.

2. If a wabapp fails then usually you can restart it in Tomcat without restarting Tomcat. BUT when I restart my webapp, it tries to reload the dlls and Tomcat complains that they are already there. How can I unload the dlls without restarting Tomcat?

Maybe these two questions are related, if I manage to put the dlls in the war, Tomcat would unload them with the app? Or am I just being hopeful.

For the time being I am using Tomcat 5.5 but could change to Tomcat 6 if these questions whould be easier to answer. And I certainly will if I am the lucky winner of the SUPER new book "Professional Apache Tomcat 6". Oooh pick me, pick me!

Thanks in advance for any help

Nicole

16 years ago
Hi,

Have a look at ConcurrentHashMap in java.util.concurrent. It is safe for multiple threads to add and remove elements. There is some very cool stuff in java.util.concurrent.



[URL=http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-summary.html]http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-summary.html


Niki
[ April 03, 2007: Message edited by: Nicole Lacoste ]
Hi

I am doing the same sort of thing with Tomcat. To start Tomcat I first check if Tomcat is running by trying to open a socket to it
this throws an UnknownHostException if Tomcat is not running. If Tomcat is running, I stop it, then I start Tomcat and wait till it is running before returning. It takes a few seconds for Tomcat to start running and I don't want the rest of my application to interact with Tomcat until its really running. To stop Tomcat I call the shutdown.bat then wait till there is no Tomcat running before returning. What does restart mean to you? That you shutdown then start again?

I am not sure how similar JBoss is, does it have a shutdown.bat too? I am pretty sure the socket thing would be the same (or what ever address you configured JBoss too).

Good luck

Niki
17 years ago
Hi

Maven works with phases, it runs every phase up to and including the phase you put after the mvn. 'package' includes 'test-compile' and 'test', so will compile the unit tests and run them. 'compile' is before the unit test phases so will do what you want. Try 'mvn compile'.

For future refeence there is a list of phases on the maven page
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

Niki
17 years ago
Hi Praveen,

Sounds like a generics problem. Try creating a ArrayList<String> and then you call the method <T> T[] toArray(T[] a) instead of the method Object[] toArray().

Niki
[ March 13, 2007: Message edited by: Nicole Lacoste ]
17 years ago