Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to deal with multi-valued parameters in a servlet?

Answer Posted / tulasi vani

To get the multi-valued parameters in servlet we can use
getParameterValues().
request.getParameterValues() which returns an array of
values which are associated with it.

Use an Enumeration to store the values.It has two methods
namely hasMoreElements()which is used in a while loop
which executes unitl it finds another element in the
enumeration and hasNext()which is again used in a while
loop and executes until it has a nextElement and retrives
the required data.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is servlet a server side scripting language?

1192


What are the exceptions thrown by servlets? Why?

1247


What is the use of welcome-file-list?

1074


When to use doget() and when dopost()?

1159


Are Servlets Thread Safe? How to achieve thread safety in servlets?

1027


What is the procedure for initializing a servlet?

1092


What is servlet container. how it works?

1177


What is a servlet?

1200


Which is better jsp or servlet?

1104


explain the advantages of servlet life cycle?

1036


How can we upload the file to the server using servlet?

1171


What is servlet and its types?

1104


How to get the server information in a servlet?

1217


How do you load an image in a Servlet?

1236


What are the objects involved when a servlet receives a call from client?

1093