This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See In a servlet, is it possible to insert a new header into the request before forwarding to a second servlet?
I'd like to avoid any kind of URL encoding if possible.
Travis Gibson
Travis Gibson
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ranchers,

In answered my own question(Don't you love when that happens)!!
Here's how it's done:
request.setAttribute(String fieldName, Object fieldValue);
then in the second servlet you do in order to get the passed value:
request.getAttribute(String fileName);

Travis Gibson, SCJP
Java Developer
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!