The Artima Developer Community
Sponsored Link

Java Answers Forum
sorting

1 reply on 1 page. Most recent reply: Jul 26, 2002 6:57 PM by Jay Kandy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Anita D.

Posts: 1
Nickname: adoornb
Registered: Jul, 2002

sorting Posted: Jul 26, 2002 1:59 PM
Reply to this message Reply
Advertisement
When I generate all the form field names and values, it displays it randomly and I would like it in the same order as when I tab it through the form?

//Generate everything that form contains (field name and values)
Enumeration parameters = request.getParameterNames();



if ( parameters != null )

{

while(parameters.hasMoreElements()) {
name = (String)parameters.nextElement();
value = request.getParameter(name);

if ( body == null ) {

body = ("\r\n" + name + " = " + value);

}else {

body = body + ("\r\n" + name + " = " + value);

}
}

}


Jay Kandy

Posts: 77
Nickname: jay
Registered: Mar, 2002

Re: sorting Posted: Jul 26, 2002 6:57 PM
Reply to this message Reply
HttpServletRequest doesnt know the order of the parameters. Follow the link:
http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/aucserv.html

Flat View: This topic has 1 reply on 1 page
Topic: Clearing screen Previous Topic   Next Topic Topic: date on jsp

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use