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 are sessions in servlets?
How is a servlet implemented in code?
How to generate the server side programming and the advantages of it over the other languages?
Which is the methods of generated servlet?
What is the web server used for running the Servlets?
What is url encoding and url decoding
What is the GenericServlet class?
What is servlet container?
What are some advantages of storing session state in cookies?
When servlet object is created?
Which httpsession object is used to view and manipulate information about a session?
What do you mean by request dispatcher in servlet? Also explain its methods.
How to get the actual path of servlet in server?
What is servlet api used for conneting database?
What do you mean by chaining in servlet?