Mark Dunphy

+ Follow
since Aug 02, 2002
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 Mark Dunphy

If budgetlist is a List, call the Collections.sort() method.
You have two choices:
1) Implement the Comparable interface for the class of objects stored in your collection (Budget class?)
2) Use the overloaded sort() method which accepts a Comparator
For approach 1), add this line to your code which retrieves the budgetlist:
16 years ago
Open a command window and change directories to the bin/ directory of your tomcat installation. Run the following command from the command line and the error will remain visible without closing the window.
...\bin>catalina run
17 years ago
To answer my own question, i just set the value in an init param for the action servlet so please ignore the question.
String log4jPropFile = config.getInitParameter("log4jPropFile");
17 years ago
Greetings all,
I am transitioning from struts 1.0 to 1.1 and see that getResources() is deprecated in ActionServlet. In my 1.0 configuration, i was overriding ActionServlet to configure log4j in init() and was calling getResources() to retrieve a property defining the location of the log4j property file. The code is listed below.
Is there an accepted way to do this in 1.1 without using a deprecated method?
I'd appreciate any input.
17 years ago
Thanks for taking the time to share the technique that you use. This sounds like it will work well for me. I was originally a bit confused as I thought the declarative exception handling was part of struts, but I realise now that it's part of the web server configuration.
18 years ago
I'm looking for ideas on the accepted way(s) to handle exceptions. I don't want an exception stack trace to appear on screen. My initial thoughts were to override some method in the Action or ActionServlet classes and
1) log an error to an errors file using log4j
2) display a generic error page
Looking at the code RequestProcessor.processException() looks like a likely candidate for overriding but I see that it has some reference to ExceptionConfig and ExceptionHandler classes. I've seen reference elsewhere to "Declarative Exception Handling" but I haven't seen any example struts-config.xml files where it's used. I also saw that there will be a chapter on this topic in the O'Reilly struts book but that isn't due until October.
If anyone could give me some pointers or examples in use, I would really appreciate it.
18 years ago
I passed yesterday and here are some of my observations. I lurked on this board for a while and drank heartily from the generous measures of advice poured by the bartenders and regular posters. Thanks to all of you.
I used "Complete Java 2 Certification" by RHE as a study guide, and i really liked the book. I also did the mock exams at JavaPrepare and jchq which rounded out my knowledge a bit more. Do as many mock exams as you can.
I lost points by not knowing in depth some method signatures and class hierarchies. I don't generally try to learn this stuff off when it's readily available in the API but it's important for the exam. That's my one problem with certification exams.
To get a high mark, I would recommend knowing the following aside from the other main exam topics:
+ method signatures for all the main classes in
+ method signatures for all the main methods in Math class
+ event class hierarchy, e.g. EventObject, and their associated listeners and adapters.
+ collection class and interface hierarchies
Also, a few obvious points worth repeating. Make sure you scroll down to see all the answer options for each question. The status bar tells you to scroll when necessary, but look at it especially if you don't fancy any of the current answers listed. Also, read each answer option carefully as it is easy to carelessly pick a wrong but similar answer because you're rushing. This may make all the difference between passing and failing.
I found the exam challenging, and definitely learned a lot from the experience. Good luck to anyone else plunging in soon.
18 years ago