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 a servlet context?
Is it possible to have a constructor inside the servlet?
What do you understand by mime type?
How will two or three servlets interact or communicate with each other?
how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file
What do you mean by cgi?
What is the procedure for initializing a servlet?
What mechanisms are used by a Servlet Container to maintain session information?
The code in a finally clause will never fail to execute, right?
What are common tasks performed by Servlet Container?
What are the difference between RMI and Servlets?
What is a servlet-to-servlet communcation?
how the HTML data stored in web server?
What is the difference between Difference between doGet() and doPost()?
What are the different session tracking techniques?