• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading data from browser other then getParameter()?

 
kengyiam Ng
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
May I know how to read data from a POST request other than using a request.getParameter() method in a JSP page? Any methods will do except using getParameter() in my JSP pages.
Please kindly advise me on this.
Thanks in advance.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I understand what you are trying to do. Can you give more information?
 
Krishna Mohan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
e = request.getParameterNames();
while (e.hasMoreElements()) {
String key = (String)e.nextElement();
String[] values = request.getParameterValues(key);
out.print(" " + key + " = ");
for(int i = 0; i < values.length; i++) {
out.print(values[i] + " ");
}
out.println();
}
 
S Chandra Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i too feel that request.getParameter() would be simple and easier.
What situation forces u to use other option ?
 
Debashish Chakrabarty
Ranch Hand
Posts: 231
Firefox Browser Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If using getParameter() is prohibited, try putting the requisite variables to be passed in Session/Applicatoion context as attributes. Fetch those attributes on the next JSP.
[ December 24, 2003: Message edited by: Debashish Chakrabarty ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic