Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get parameters of an HTTP request?

 
Alan Blass
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I want to get the parameter of http://www.myweb.com/home.jsp?goog=true&yaho=false

Problem is request.getParameterMap() does not contain the parameters. Only request.coyoteRequest.parameters.queryMB contains it.



How do I get the parameters?

Please help. Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alan Blass wrote:Problem is request.getParameterMap() does not contain the parameters.

Of course it does. It returns all the parameters as a Map instance.

You can also use getParameter() or getParameterValues() to get a specific parameter by name.

You should not be using the coyote-specific classes at all.
 
Alan Blass
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Thanks for your answer.

It does not. ParameterMap is empty.



Please help. Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then there is something wrong with your code, setup or configuration. Please post relevant details.
 
Alan Blass
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry. My mistake. It does contain the parameters when I did a request.getParameter("goog");

Thanks for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic