File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Servlet Context question" Watch "Servlet Context question" New topic

Servlet Context question

Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
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

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.
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:
subject: Servlet Context question
It's not a secret anymore!