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
Is servlet a server side scripting language?
What are the exceptions thrown by servlets? Why?
What is the use of welcome-file-list?
When to use doget() and when dopost()?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
What is the procedure for initializing a servlet?
What is servlet container. how it works?
What is a servlet?
Which is better jsp or servlet?
explain the advantages of servlet life cycle?
How can we upload the file to the server using servlet?
What is servlet and its types?
How to get the server information in a servlet?
How do you load an image in a Servlet?
What are the objects involved when a servlet receives a call from client?