I have got two doubts
Will this work in JEE 6?I mean to ask whether autoboxing feature is available in JEE6 .I know it is available in JDK 1.6.
2)Upon a user's first visit to website which two operations are always performed when the getSession() is called without arguments on a servlet
a)All URLS' returned are encoded.
b)An HttpSession object is created if necessary.
c)Session ID is stored as cookie in response.
As per me answer should be a) and c).Am I correct ranchers?
Option "a" is wrong because url rewriting does not happen automatically.
Option "b" is correct because this is what getSession() does.
Option "c" is correct because container is required to support cookies as session tracking mechanism.
What if I was writing the SCWCD 5 exam then what would have been your answer for 1).
This depends on your servlet-container provider. If you check the servlet specifications (e.g. Servlet 2.4, SRV 1.2):
J2SE 1.3 is the minimum version of the underlying Java platform with which
servlet containers must be built.
Have you tried Tomcat 5.5? I guess it does support Java SE 1.5 and therfore autoboxing.
So suppose I am writing SCWCD 5 then can I consider autoboxing as automatic?
I agree with Piyush (if I had to choose an option in such a question).
An exam question involving autoboxing without mentioning Java SE1.5 wouldn't be fair as it isn't mandated by the specifications (and those are the subject of the certification), so I guess it won't happen.