Marius Paraschiv

+ Follow
since Apr 07, 2008
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 Marius Paraschiv

Look here:
I can't find a method name like getContextPath in Servlet api 2.4

The method is present in Servlet API 2.5 but not in 2.4

And from the Faq answers:

What spec versions should I reference?
The SCWCD 5 actually still covers the J2EE 1.4 Platform, which includes Servlets 2.4 and JSP 2.0.
The answer says that the method getContextPath is defined in HttpServletRequest and ServletContext but the method is defined only in HttpServletRequest
Sorry, I have misunderstood your first response, my fault.
Mine shows "The blank final field b may not have been initialized"

I have Eclipse 3.4 and JDK 1.5.0_15.
@John Meyers

Before I have posted this, I have looked at this errata and this is not on the list. Is there any new errata list ?

@Bhushan Chhajed

Arrays and Collections are utility classes and they must mark their api methods as public to be accessible by any class. Don't mistake utility classes with interfaces, where you don't have to type public abstract in front of the methods. I have looked even in the source code of the JDK(I'm using 1.5.0_15) and of course the methods are marked public.

Another little typo is on the page 610:

The generics type identifier can be used in class, method, and variable declarations:
class Foo<t> { } // a class
T anInstance; // an instance variable
Foo(T aRef) {} // a constructor argument
void bar(T aRef) {} // a method argument
T baz() {} // a return type
The compiler will substitute the actual type.

"t" must be "T"

[ July 06, 2008: Message edited by: Marte Marte ]

[ July 06, 2008: Message edited by: Marte Marte ]
[ July 06, 2008: Message edited by: Marte Marte ]
In the table 7-4 there are listed some methods from java.util.Arrays and java.util.Collections, and some of them have the access modifier and some of them not. All the methods should be marked as public.