1

I have a JSP page that has two pieces of data that I need to send to a page on another domain via post when a button is clicked.

My original iteration was just having the two pieces of data in 2 hidden fields and when the user clicked a button it posted those two data and all was good in the universe.

  • I showed it to the client and they say that I can't have the data seen in View Source and I can't pass this data via get (even though anyone with a sniffer can grab the POST contents. the client wont listen).
  • They also nixed my idea of using GET via sendredirect
  • They are also against encrypting it and sending it via GET

Is there an "easy" way to do this with just JSP and possibly Javascript? or if necessary through a servlet?

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
Mack Jones
  • 11
  • 2

1 Answers1

0

Just submit the form to a servlet which in turn uses java.net.URLConnection to fire another POST request programmatically. This way your servlet will act as a proxy.

See also:

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452