How would I forward parameters in a servlet?

Currently I have a servlet which stores some data into a database. I intend for it to forward the user afterwards to some other website depending on a parameter sent to the servlet. The problem is I can't get it to forward the parameters or don't know how rather.

Example:
Site A = The Servlet which stores data
Site B = The Other Company they do what they want with the data
Site C = The form which passes parameters to Site A


Site C ---> Site A (parameters) -----> Site B (same parameters as Site A)

It would not be to hard to redirect the user if I was just using get. However, I'm using get or post and need to have the ability to send get or post.
richardsimnettAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
you can only redirect sorry, and you cannot redirect a post
so you'll need to either redirect using a GET
or make the POST request direct and return results yourself to caller
0
 
richardsimnettAuthor Commented:
I forgot to mention that it must work across more than one domain... Site A http://www.a.com Site B http://www.b.com Site C http://www.c.com
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
objectsCommented:
> I forgot to mention that it must work across more than one domain...

doesn't really change things, you're still stuck with doing a redirect
0
 
richardsimnettAuthor Commented:
Okay
0
 
CEHJCommented:
Sorry - i missed the bit about the POST
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.