• Post Reply Bookmark Topic Watch Topic
  • New Topic

setParameter

 
mik laan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Does Servlet API contain any methods to add parameter to querystring?
I have a situation where I should add key=value-pair to request that I am forwarding from one servlet to another.
How can this kind of thing be handled?
There are no request.setParameter or response.setParameter methods or I did not find them. And using request.setAttribute does not work in this case.
Is it possible to do a own new request and fill it with a new key=value-pair?
Can anyone help me?
Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been addressed in the Servlet forum.
It's considered bad karma to cross-post questions.
bear
 
Sudd Ghosh
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can pass parameters to the dynamically included components, using jsp aram action inside jsp:forward action. Then from the included components do a request.getParameter.
Sudd
 
Sudd Ghosh
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I am wrong. You mentioned servlet not JSP.
Anyway I found the correct way of doing this in the other post in "Servlet" forum.
Thanks, Sudd
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!