JSP: deliver form fileds in the same order as they are in the HTML form
The following script delivers the form data to my email, but not in the same order as the fields are in the fom. e.g. Name, Email and Comment fields come respectively in the form, but when delivered to my email, each time they are sorted in a different way.
Actually I haven't specified any order for the form field submission; it is just like what I have done it in the above code, but still get the data to my email in different sequences each time. "The order in which getParameterNames() returns parameters can be different than the order in which they appear in the HTML form". Looks like I need to use a Collection e.g. ArrayList in order to keep the right order, as read while googling. But since this my first ever JSP code, since graduation, this doesn't come as an easy thing for me I will keep fighting!
Last edited by Atrisa Milani; 10-18-2012 at 02:31 AM.
Bookmarks