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
Differentiate between get and post?
Explain load on start-up and its importance?
Is servlet a framework?
What do you mean by scope object and what are its types?
What’s the difference between sendredirect and forward methods
What is the use of welcome-file-list?
What is servlet container?
What do you mean by web applications?
What is servlet and its types?
What are the types of Session Tracking ?
What are the different methods involved in the process of session management in servlets?
Differentiate between the get and post method
What is the requirement of servlet config and servlet context implemented and how are they implemented?
How can we refresh automatically when new data has entered the database?
What is a servlet-to-servlet communcation?