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?

Answers were Sorted based on User's Feedback



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

Answer / janet

Use the getParameterValues() method. This returns a String
array(or null) containing all the values of the parameter
requested.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

More Servlets Interview Questions

what is the difference between?when we write the code in following manner? class One extends httpservlet { } and class One extends genericservlet { }

4 Answers  


How to get the server information in a servlet?

0 Answers  


what is a session object?

2 Answers  


what are the CGI Programs?

5 Answers  


What do you mean by request dispatcher in servlet? Also explain its methods.

0 Answers  


What is Server-Side Includes?

1 Answers   IBM, SAS,


if u havea .class file ,how can u say whether it is servlet or not ,dont use java decompliler

4 Answers   Polaris,


Why is a constructor needed in a servlet even if we use the init method?

0 Answers  


How can we refresh automatically when new data has entered the database?

0 Answers  


Why is servlet used?

0 Answers  


What is servletconfig?

0 Answers  


How will you pass values from HTML page to the servlet?

0 Answers  


Categories