It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Servlet Context question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Servlet Context question" Watch "Servlet Context question" New topic
Author

Servlet Context question

Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Given:
String v = getServletContext().getInitParameter("abc"); is an httpservlet and a web app D.D that contains:


Which one is true??


Thanks in advance.


SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
Milesh Dcunha
Greenhorn

Joined: Jun 19, 2006
Posts: 13
Answer: A. The abc initialization parameter cannot be set programmatically.
[ June 27, 2006: Message edited by: Milesh Dcunha ]

The world is becoming an orgy of self-sacrifice when it is precisely the self that should not be sacrificed.
MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Originally posted by Jas Oberai:

Which one is true??


Thanks in advance.[/QB]



Only servlet init params can be retrieved using getServletConfig().getInitParameter("abc");


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Thanks Friends for all your help..really appreciate it from the core of my heart...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Context question