Solved

How would I forward parameters in a servlet?

Posted on 2010-11-15
6
268 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:richardsimnett
  • 2
  • 2
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34140720
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 34140851
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
 

Author Comment

by:richardsimnett
ID: 34140856
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 92

Expert Comment

by:objects
ID: 34140870
> 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
 

Author Closing Comment

by:richardsimnett
ID: 34140877
Okay
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34140895
Sorry - i missed the bit about the POST
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java.io.BufferedReader   readLine()  //returns the entire file ? 4 75
MySQL  on Tomcat 8 47
Adding multiple JVM environments to RedHat 6 7 24
printf performancy 11 43
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question