• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to retrieve data from table

 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sending some data from the HTML <form> which is presented as a table. Is there any way to retrieve those data completely as a whole table(as like dataset in .Net), instead of getting them as request.getParameter() for each and every formfield.

Thanks.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean you're not satisfied with getParameterMap, getParameterNames or getParameterValues ?
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not understand your question properly. But I will try to answer anyhow.

A dataset maybe revelant for rich client interface (.NET) but when you are dealing with a web interface, it has to be done via HTML FORM elements - and you need to use request.getParameter() to get the value.
 
vjy chin
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Satou kurinosuke pointed out,

You can use getParameterValues(). It will return an array of Strings. It will give all the values in a particular column.
 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,

But how can i be sure that the getParameternames() and getParametervalues()will get the parameters in same order as i am sending.?

and also please tell about getParameterMap().
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no concept of HTTP form parameters being sent or received in any particular order. What scenario do you have in mind where that could make a difference?

The javadocs for getParameterMap are pretty much to the point; what are you unsure about that's not covered there?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!