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.
I know I could control that using a HTML structure in my JSP page, but is there any other way to address this problem with JSP in the above code?Code:Enumeration paramNames = request.getParameterNames(); while(paramNames.hasMoreElements()) { String paramName = (String) paramNames.nextElement(); String paramValue = request.getParameter(paramName); if (request.getParameter(paramName) != null && request.getParameter(paramName) != "") { message.println(paramName + ": " + paramValue); } }


Reply With Quote

Bookmarks