Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

miceal oconnor

+ Follow
since Nov 07, 2001
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 miceal oconnor

thanks guys .. I'll check it out.
17 years ago
Can anyone tell me what the main differences are in the new version of Java.

When will these be incorporated into the certification exam?

17 years ago
Hello Guys,
Sorry for not getting back to you earlier!
In answer to Bills Question:
the directory path is /webapps/myApp/WEB-INF/classes
The web.xml file is in the WEB-INF directory.
The java files are in the classes directory.
In Answer to Karls question:
My Helloworld class is not a member of any package? Why does it need
to be? I'll have to check the examples directory in Tomcat but I don't believe they are a part of any package. However I will try your suggestion.
I just can't see why the examples work, but my code doesn't??
Thanks - Michael
18 years ago
Ooops .. I typed in the wrong URL.
it should have been http://localhost:8080/myApp/servlet/HelloWorld
18 years ago
Hello Guys,
I've been following the discussions about the HelloWorld servlet not working in Tomcat v4.1.27. Since I suffer from the same problem I tried a few of the suggested solutions last night but to no avail.
I am running Redhat 9, Java SDK 1.4, J2EE1.2 & Tomcat 4.1.27 LE.
There were two main solutions to this problem:
1. Uncomment the following line in the web.xml file ( in conf dir ).
Stop / Start Tomcat.
This should have allowed me to view the URL http://localhost8080/myApp/HelloWorld
However I still got the 404 page not found error.
2. Next I looked at the examples which come with Tomcat & work.
They have the <servlet-mapping> & <url-pattern> tags in the applications web.xml file. So I edited my HelloWorld's web.xml & inserted these lines.
Stopped/started Tomcat but it still didn't work.
The only othre difference between the examples web.xml & my is a load of stuff about filters?
Can anybody help as I'm beginning to feel a lot of resentment towards Tomcat!!!
Cheers - Michael.
18 years ago
The java sdk1.4 is now installed & running. Tomcat is installed & running
but when I installed j2ee & tried to run a Helloworld servlet it couldn't find the HTTPservlet class. I'm sure I haven't configured something?
Has anybody got any suggestions??
Thx - Michael.
18 years ago
Hello One & All,
I've just installed Redhat v9.0 on PC. no issues there.
I don't really know a lot about Linux (yet) but I want to get
programming in Java asap.
Does Java come with Redhat 9, if so where is it installed?
If it doesn't come with Redhat 9 how can I install it?
My end goal is to install Tomcat so I can write & test Servlets
& JSP's etc..
Thanks a million - Michael.
18 years ago
Hello Guys,
When you declare variables in a class ( member variables ) they are automatically assigned default values. However when you declare variables in a method they are not assigned default values. Is this also true of arrays? I read somewhere that array elements are always given default values are declaration & construction?
Thanks - Miceal
Instance Variables cannot be static. Static variables are associated more with the class then with an instance of the class. Therefore A would not be correct.
I am looking to upgrade my skills. First stop is to become a JSCP, after which I was thinking about seeking XML certification. Can anybody tell me if this is a wise path to take. Is XML in great demand & what kind of jobs or scenario's is it used in?
Thanks - Miceal.
Hi Manfred,
So the only difference between normal exceptions & checked exceptions is that the compiler looks for certain exceptions & thus they are checked?
If that is true then a novice like myself wouldn't have a clue just by looking at code whether it threw a checked exception or a normal one?
Finally, would it not be easier to just write your program, cater for the exceptions you think may occur & let the compiler pick up the rest?
Thanks - Michael.
Oops!! Sorry about that ..anyway I'll start again.
I think the source of confusion is the difference between a block of static initialisation code & a normal block of initialisation code.
For example
class Test {
// Normal Initialisation block
// code
In the case shown the initialisation block is executed every time the class is instantsiated. However if you insert a 'static' keyword in from of the opening brace the code will be executed when the class in loaded & not when it is instansiated.
I think I have that right ... anybody got any objections?

I think the source of confusion is the difference between a block of static initialisation code & a normal block of initialisation code.
For example
class Test {

Hello Guys,
When you write/design code are you expected to know & cater for in advance all the conditions under which checked exceptions may arise & what exceptions might be thrown? Or do you just write away & then when you try to compile your code the compiler notifies you that you have checked exceptions on lines 3, 8, etc..... that must be catered for?
Is the only difference between checked & 'normal' exceptions the fact that the compiler makes you cater for 'checked' exceptions whereas for for 'normal' exceptions you are left to your own judgement?
Thank you.