jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes getInitParameter() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getInitParameter()" Watch "getInitParameter()" New topic


Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, I have a question about getInitParameter((String)paramName) and getInitParameterNames(). Are they methods of HttpServlet or ServletConfig? I have seen aServletConfig.getParameter(paramName) called in the public void init(ServletConfig aServletConfig) method. I also saw getInitParameterNames() called within doGet() as a HttpServlet method.
Please help clarify.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
they are two different methods, with different names, defined in different classes. Is this a problem?

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi Frank, sorry, I am just wondering if the initParameter that the two methods refer to are the same as specified in Web.xml?
It is sorta covered in the JavaRanch Style Guide.
subject: getInitParameter()
It's not a secret anymore!