Manish
asked on
Session Tracking
Hellow Experts,
1. I need stepwise explanation of session tracking like
when user request ,it creates session object ......(I dont need code).
2.Why in System.out.println() out is not initialized to null?
Plz give answers to these simple questions?
Thanks,
Karan
1. I need stepwise explanation of session tracking like
when user request ,it creates session object ......(I dont need code).
2.Why in System.out.println() out is not initialized to null?
Plz give answers to these simple questions?
Thanks,
Karan
For 2) just to add that the "out" stream, i.e. the output stream is static and already open, therefore it does not need any initialization to null.
ASKER
So for next request session object extract sessionId from
cookie/url ?
session object automatically send sessionId to store in cookie/url?
cookie/url ?
session object automatically send sessionId to store in cookie/url?
ASKER
Why System can not be instantiated?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
> So for next request session object extract sessionId from cookie/url ?
No, the server extracts the session id from the cokkie/url.
> session object automatically send sessionId to store in cookie/url?
No, the server stores the session id in a cookie/url.
No, the server extracts the session id from the cokkie/url.
> session object automatically send sessionId to store in cookie/url?
No, the server stores the session id in a cookie/url.
ASKER
Thanks girionis,
I just to want to clear abt System class,
System class is not static ,so y it is not instantiated?
and is it correct that out is not initialized to null bec
the output stream is static and already open,.
I just to want to clear abt System class,
System class is not static ,so y it is not instantiated?
and is it correct that out is not initialized to null bec
the output stream is static and already open,.
Yes, System is not a static (it is final, for more info on final classes have a look here: http://java.sun.com/docs/books/tutorial/java/javaOO/final.html) but you do not instantiate it because all of its methods are static and therefore you can call them straight aways (without having a referebnce to the System class, since as we said static methods belong to the class and not to each individual instance). Besides the constructor for the System class is private (I think) and even if you wanted you couldn't instantiate it.
> and is it correct that out is not initialized to null bec
>the output stream is static and already open,.
To the best of my knowledge this is correct.
> and is it correct that out is not initialized to null bec
>the output stream is static and already open,.
To the best of my knowledge this is correct.
ASKER
Thanks
karan
karan
Correct, you can't instantiate System and the static members such as out and in are already available for use by the JVM
Thank you for accepting, glad I was of help :)
2./It is an integral part of the System object (see here http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html) and cannot be instantiated and therefore initialized.