• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding request parameters to a forward from a servlet

 
Paul Duer
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
This one just might be a brain drain, but I am having trouble with my servlet to Struts knowledge.
I have a Struts app that starts at a certain .do action. I usally have a first JSP page that gets into the app and it uses the forms and action classes from there.
But i have a case now were I am in a servlet and I want to forward directly to the Struts app and call the first .do action. But, I want to put some new request parameters that I got in the servlet on the request.
So what statement in the servlet can add parameters to the request object?
 
Ruud Steeghs
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the only way to add parameters to a request in code is to put them in the query string...
that means you have to obtain a request dispatcher and forward to youraction.do?par1=value1&par2=value2
Ruud.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic