aspose file tools
The moose likes JSP and the fly likes setParameter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "setParameter" Watch "setParameter" New topic
Author

setParameter

mik laan
Greenhorn

Joined: Sep 04, 2002
Posts: 29
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 opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

This has been addressed in the Servlet forum.
It's considered bad karma to cross-post questions.
bear


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Sudd Ghosh
Ranch Hand

Joined: Oct 23, 2002
Posts: 187
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


Sun Certified Java2 Programmer-1.4<br />Sun Certified Web Component Developer for J2EE Platform<br />Sun Certified Business Component Developer for J2EE1.3
Sudd Ghosh
Ranch Hand

Joined: Oct 23, 2002
Posts: 187
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
 
IntelliJ Java IDE
 
subject: setParameter
 
Threads others viewed
which Collection?
Simulating "request.setRequest"
scjp chapter 7 self test doubt
Check if ArrayList Contains a Map
Creating an HTTP Header
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture