Modify HTTPServletRequest

M

Matt Pokress

We are trying to write a new servlet that will communicate with some
existing servlets that we purchased from a third party. We need to parse
and modify some or all of the parameters in the HTTPServletRequest before it
is passed to the third party servlet. I see from the documentation that a
ServletRequest cannot have its parameters changed once it has been created.
Do we need to create a new ServletRequest within our servlet and populate it
with the necessary new and old parameters? If yes, where is the
documentation that defines the initialization functions for ServletRequests
and HTTPServletRequests?

Thanks,

Matt
 
W

Wendy S

Matt Pokress said:
We are trying to write a new servlet that will communicate with some
existing servlets that we purchased from a third party. We need to parse
and modify some or all of the parameters in the HTTPServletRequest before it
is passed to the third party servlet. I see from the documentation that a
ServletRequest cannot have its parameters changed once it has been created.
Do we need to create a new ServletRequest within our servlet and populate it
with the necessary new and old parameters? If yes, where is the
documentation that defines the initialization functions for ServletRequests
and HTTPServletRequests?

If it were my own Servlet, I'd place a Filter in front of it and manipulate
the Request. Do you have control of the web.xml that controls the
third-party Servlet?

Here's an article that might help: http://servlets.com/soapbox/filters.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top