File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and JSP

 
Suresh Shah
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following in web.xml.
<context-param>
<param-name> TheParam </param-name>
<param-value> ParamValue </param-value>
<description>The quick brown fox.</description>
</context-param>
using the following I am able to get all <param-name> and all <param-value> displayed in a JSP form.
<P>
<TABLE border cellspacing=0 cellpadding=5>
<tr>
<th colspan=3 align=center>context.getInitParameter</th>
</tr>
<tr>
<th>Parameter Name</th>
<th>Value</th>
<th>Description</th>
</tr>
<%
for (Enumeration enu = application.getInitParameterNames();
enu.hasMoreElements() {
String x = (String)enu.nextElement();
temp = application.getInitParameter(x);
%>
<tr>
<td><%=x %></td>
<td><input text value= <%=temp %> ></td>
</tr>
<%
}
%>
I need to be able to display <description> also. How do I do it?
 
Sri Basavanahally
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The description is not a parameter. If you want to display it, put it in as a parameter.
-Sri
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As posted by Sri, do this
<context-param>
<param-name> TheParam </param-name>
<param-value> ParamValue </param-value>
<param-name> description </param-name>
<param-value> The quick brown fox</param-value>
</context-param>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic