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 meant by servlet? What are the parameters of the service method?
What is servlet in simple terms?
Explain mvc pattern.
How can you run a servlet program?
What are the kinds of http requests?
Why is httpservlet declared abstract?
How can you start a jta transaction from a servlet deployed on jboss?
What are the different types of servlets?
How to get the IP address of client in servlet?
What is the purpose of requestdispatcher interface?
How do you run a servlet?
Whether we can get deadlock situation in servlets?
What is the difference between genericservlet and httpservlet
How can we upload the file to the server using servlet?
What are the type of protocols used in httpservlet?