Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

config.getInitParameter does'nt work

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I am unable to access the inititalisation parameters with config.getInitParameter() method. But I could do the same thing with application.getInitParameter(). why ?
what is the diff between these two methods? Can anybody help.
Thanks
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note that The Java Ranch has a naming policy, described here and "meena m" is not a valid name. Please choose one which meets the requirements.
Thanks.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is usually because your servlet redefines init, but does not call super.init as its first action. Check your init.
 
meena murugu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling these methods from jsp page as follows:
<%= config.getInitParameter("var1") %>
<%= application.getInitParameter("var1") %>
and only the 2nd one works. I initialised the parameter thru' the application server JRUN.
Thanks
meena

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic