nancy andrew wrote:Hi All,
Recently i came across a question. Suppose there are two different jsp pages namely a1.jsp and a2.jsp
a1.jsp contains some text dynamically loaded text fields:
Emp Name
Age
Salary
When we sumbit this page, then the output should be printed in a2.jsp
This would have been easier. But there is a condition that suppose name and id of the text box are not be used anywhere. Please answer this.
Hi Nancy,
1.When you are submitting a1.jsp suppose using javascript form.submit to the a2.jsp assuming that the
Emp Name
Age
Salary are present in the form.
All the form parameters are populated into the request object.
2.In the a2.jsp You can use
request.getParameterNames() and
request.getParameterValues() to get the list of form names and their values without refering to the textbox names or Id.
Hope this helps..
Aruna.