| Author |
Retrive data from requst object without using getParameter()
|
Mastan Rao
Greenhorn
Joined: Nov 26, 2007
Posts: 10
|
|
Hi all can anyone help me to retrive the values from request object with out using request.getParameter() method, I have a 50 fields in the form,I dont wanna to get those 50 values using 50 getParameter() statements.I need to store those values in the Data base. Thanks in Advance, Mastan Rao.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
|
If you were to inspect the API for the request you will find other methods to obtain parameter values; one of which will retrieve all values at once as a Map.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
mithun gooty
Ranch Hand
Joined: Mar 14, 2006
Posts: 33
|
|
You can use getParameterMap() method of HttpServletRequest class to get all the parameters in the form of a Map. The returned Map has parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
|
 |
Mastan Rao
Greenhorn
Joined: Nov 26, 2007
Posts: 10
|
|
|
thanks a lot mittam gooti
|
 |
 |
|
|
subject: Retrive data from requst object without using getParameter()
|
|
|