Solved

How would I forward parameters in a servlet?

Posted on 2010-11-15
6
265 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 61
for i loop in grovy 1 32
Requested array size exceeds VM limit 3 50
Problem to start Neon 20 54
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now