Solved

How would I forward parameters in a servlet?

Posted on 2010-11-15
6
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
check java version using powershell 13 470
mysql jsp example issue 32 96
Java: anonymous class 4 54
Which is best Image Resizing Web service 11 40
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Suggested Courses

738 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