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 servletcontext & servletconfig initilization parameter 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 "servletcontext & servletconfig initilization parameter" Watch "servletcontext & servletconfig initilization parameter" New topic

servletcontext & servletconfig initilization parameter

gurneeraj singh
Ranch Hand

Joined: Mar 19, 2008
Posts: 80
It is written on pg:857 question number 60 of HFSJ, that

"only context params can be directly accessed from JSP's"

But according to me we can access

servletContext parameters using


servletConfig parameters using

So, they both are directly accessible from a jsp.

please correct if i am wrong.

Thanks in advance
[ October 20, 2008: Message edited by: gurneeraj singh ]

SCJP 5.0 93%<br /> <br />SCWCD 5.0 97 %
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
I agree to what your saying. If i think from EL angle [which is not mentioned in the question] then servlet context params can be accessed directly using ${initParam.paramName} which servlet config params cannot be accessed from EL in JSPs.

Lets see what others have to say.

gurneeraj singh
Ranch Hand

Joined: Mar 19, 2008
Posts: 80
no replies...
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

They may have forgotten scriptlets. What is the exact question/answers ?

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: servletcontext & servletconfig initilization parameter
jQuery in Action, 3rd edition