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
What is the difference between the servlets and cgi programs?
How to get the actual path of servlet in server?
How do you configure a centralized error handler in servlets?
What is cookie? Why is cookie used?
When to use doget() and when dopost()?
Whether we can get deadlock situation in servlets?
What is servlet invoker?
What is meant by a web application
What is webservlet?
What is the major difference between servlet and applet?
Write a simple servlet program to print the contents of html.
What are important features of Servlet 3?
how many jsp scripting elements are there and what are those?
What is the difference between servlet and filter?
What are all the protocols supported by httpservlet?