Page 1 of 1

enthuware.jwpv6.2.646

Posted: Wed Aug 17, 2011 11:30 am
by RoyEL1
Answer:
servletContext.getEffectiveSessionTrackingModes().contains(SessionTrackingMode.URL)

to me seems like a better answer, in reading through the JavaDoc for ServletContext, this method will list what is currently in effect and not just the defaults. So IF prior to this method call there was
servletContext.setSessionTrackingModes(...) call then getEffective... would be better than getDefault...

I'm I wrong in my understanding?

Re: enthuware.jwpv6.2.646

Posted: Wed Aug 17, 2011 4:09 pm
by admin
The question is asking for session tracking modes that the container is configured to support. Not for the ones that are currenlty effective. So I think the given answer is correct.
HTH,
Paul.

Re: enthuware.jwpv6.2.646

Posted: Wed Aug 17, 2011 7:57 pm
by RoyEL1
Thanks.

Re: enthuware.jwpv6.2.646

Posted: Wed Nov 07, 2012 2:21 pm
by denis
I agree with RoyEL1. In my opinion the word "currently configured" things includes the calls to setSessionTrackingModes() which I could have decided to include in my programmatic configuration temporary to modify the default tracking modes so the currently configured tracking modes are the result of all of my current configuration, programmatic or not.

If the word "support" were added to the question I will agree that the answer has to be the "default" tracking modes as this is the list that the container actual support.

Anyway I feel this question is rather confusing.

Best Regards,
Denis

Re: enthuware.jwpv6.2.646

Posted: Wed Nov 07, 2012 7:35 pm
by admin
The problem statement has been updated to make this clear.

thank you for your feedback!