• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding request parameters to a forward from a servlet

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic