This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes getInitParamater() method 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 "getInitParamater() method" Watch "getInitParamater() method" New topic

getInitParamater() method

Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
What is the difference between getinitParameter() method in ServletContext and in ServletConfig ?
Can we use either of this to get the value of init patrametes ?

suresh thallam

Joined: Sep 08, 2002
Posts: 2
by using context.getInitParameter() we can access context-wide initialized parameters. These parameters are defined in web.xml using <context-param> tags. These values are accessiable to all the servlets and jsps present in the context.
By using config.getInitParameter() we can access the initialization parameters defined for that servlet only. These are specific to that servlet only. These are defined in web.xml like this

Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
Thanks Suresh
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: getInitParamater() method
It's not a secret anymore!