This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
1) of course it will work. Java EE 6 is built on top of Java SE 6.
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.
JRE version of JVM, that container uses to run, can be changed as needed (Just set the JAVA_HOME environment variable).
In exam you can assume that Java EE5 container runs Java SE5 JVM, so the autoboxing will work.
Creator of Enthuware JWS+ V6
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.