This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes ServletContext initialization parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "ServletContext initialization parameters" Watch "ServletContext initialization parameters" New topic

ServletContext initialization parameters

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
Question 2 of Mock exam chapter 5 says that servletcontext initialization parameters should be used for data that rarely changes. I have doubt whether the statement should be rarely changes or does not change.Can someone give me an instance where this parameter changes.

thnx in advance.

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
John Wolf
Ranch Hand

Joined: Feb 18, 2002
Posts: 64

The Context init-param can only be changed manually by updating the web.xml, hence its for data that "rarely changes." It depends on the parameters being added to the web.xml, one example is the configuration file names or path changes that need to be loaded when the container loads. These file names or path don't change that often, but when they do, you need to update the web.xml.
It is sorta covered in the JavaRanch Style Guide.
subject: ServletContext initialization parameters