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
Servlet is pure java object or not?
What is a web container and what is its responsibility?
What is the use of httpservletrequestwrapper?
What is cgi and what are its drawbacks?
What are the annotations used in servlet 3?
If my browser does not support cookie, and my server sends a cookie instance what will happen?
Explain the difference between servlet and cgi?
Is it good idea to create servlet constructor?
what is servlet chaining?
What are the new features added to servlet 2.5?
What is lazy loading and what is Generic Servlet Class?
What is the type of method for sending request from http server?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
What is servlet collaboration?
How can the referrer and the target urls be used in servlet?