aspose file tools*
The moose likes JSP and the fly likes Servlet and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Servlet and JSP" Watch "Servlet and JSP" New topic
Author

Servlet and JSP

Suresh Shah
Greenhorn

Joined: Oct 29, 2003
Posts: 3
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

Joined: Oct 07, 2003
Posts: 75
The description is not a parameter. If you want to display it, put it in as a parameter.
-Sri


UP THE IRONS !
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
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>


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet and JSP
 
Similar Threads
using radio button in struts
Validation rule for array of objects.
Cache Problem
How to retrieve the values of dynamically created text boxes in jsp
NullPointerException: Module 'null' not found