• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

initialization parameters

 
friso jonge
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the web.xml you use the <servlet> tag.
in there you can use <init-param> tags. How can you read those.
do you use
getParameter(string)
or
getInitParameter(string)
I assume the getInitParameter is used for <context-param> in the <context> tag.
Again my book has conflicting material
 
Jagdeep Singh
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletConfig.getInitParameter(String name)
ServletConfig.getInitParameterNames()
For more details read Servlet API ServletConfig interface.
 
manzoor patel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friso jonge,
There are two getInitParameter() methods,
one in servletContext.getInitParameter()
and the ohter on in ServletConfig.getInitParameter()
The first one gives the <context-param>
and the second one gives
<init-param>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic