Marius Paraschiv

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

apache-tomcat-5.5.27\common\lib\servlet-api.jar
Look here: http://www.jdocs.com/servlet/2.4/api-index.html?render=classic
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
http://www.jdocs.com/javaee/5.0.0/javax/servlet/ServletContext.html


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.