Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting the init parameters in the servlet.xml file in Tomcat config.getInitParameter

 
Amit Roy
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I wanted to know as to how do i set the parameter in the servlet.xml file in Tomcat so that i can collect it bu using the config.getParameter() method
Amit
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amit,
We have to edit ../yourwebappln/web-inf/web.xml file to include <init-param> .... </init-param> xml sub tags to include your congigurable parameters. Please refer to this related discussion.
http://www.javaranch.com/ubb/Forum7/HTML/001790.html
regds
maha anna
[This message has been edited by maha anna (edited March 26, 2001).]
 
Amit Roy
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I have configured everything according to the article for which u had provided the link as i am invoking the config.getInitParameter() from a jsp page I have set the <servlet-class> tag to jsp i am also using the proper syntax to call the method still it seems to return null actually i want to return a particular path as a string from the web.xml file but it always returns a null any suggestions???
 
Amit Roy
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I have configured everything according to the article for which u had provided the link as i am invoking the config.getInitParameter() from a jsp page I have set the <servlet-class> tag to jsp i am also using the proper syntax to call the method still it seems to return null actually i want to return a particular path as a string from the web.xml file but it always returns a null any suggestions???
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!