Which of the following statements are true about Servlet Contexts?
a. A Web Application may be having more one instace of a Servlet Context object.
b. All the Servlets in a Web Application will be sharing the same Servlet Context information.
c. Servlet Context Information are declared in Web Deployment Descriptor file.
d. It is also possible to define Servlet Context Information at the run-time.
The answer are: a, b, c
but the answer a, for me is wrong, because I am assuming that the webapp is running on only one containter; obiviosly if the webapp is running in more of one container, they will have more of one instance of Servlet Context.
My Question is, if ones of this question appears on the real exam, I am mandatory to think that the webapp is running on a distribuied system ?
answer (a) is correct because if your application runs in a distributed system the there will be one ServletContext per VM. for the real exam don't worry you will be given the number of correct answers so you will have to choose the most corect. sometimes you may find more than one correct answer but by knowing the number of correct answers then you can select just the most accurate and correct answers.
what i mean is that in the case of this question if you knew that there were three correct answers, then for sure you would have choosed (a) too ;)
Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog