Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving Context Parameters  RSS feed

 
Joe Fisher
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm having trouble accessing context-params from Tomcat Deployment Descriptor file.
I'm looking for an example of application.getInitParameter(param_name) that works in Tomcat 4.1.24 (Servlets 2.3).
Please include web.xml file or segment.
Thanks !
 
Vivek Mongolu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web.xml
<web-app>
<context-param>
<param-name>name</param-name>
<param-value>Joe</param-value>
</context-param>
...
..
</web-app>
in JSP
<%
String str = application.getInitParameter("name");
%>
Vivek
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!