• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

POST Redirect to external URL

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends

I have a problem that I don't know how to resolve. Well I have a solution, but I don't like so much.

Well, my app is between two external apps. This app receive a post request and I have to modify this request adding some parameters, and then send a post redirect to the final app with this parameters. The final app only accept post method, I can't use query string parameters. The user need navigate with his browser from requested app to final app, because he need to answer some questions in the final app. These 3 apps are in different servers.

I only found a solution... Althought as I told you before, I don't like so much. The solution is develop a jsp that writes a form post with all parameters and auto-submit method in body load.

what do you think? Is the only way?

Thanks
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the java.net URL and URLConnection classes, or better yet, investigate tools like HttpClient.
 
Carlos Calvo Garcia-Cuerva
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I know that classes, but I need to redirect our users to final app and they write in that app some ndormation

If I use that classes I can connect with final app and then write in my context the response, but I don't need that I need to put our users in the final app server

Do you understand me? Am I wrong? is it possible post redirect with that classes?

Thanks
 
Bear Bibeault
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carlos Calvo Garcia-Cuerva wrote:Yes, I know that classes, but I need to redirect our users to final app and they write in that app some ndormation

I have no idea what you are trying to say here.
 
Carlos Calvo Garcia-Cuerva
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry


Well, I'll try to explain it better


As I told you there are 3 apps and users will navigate by all of them. In the first one they buy products and then they will be redirected to our payments gateway, at this time we need to redirect users to the bank app where they'll write their passwords for their cards. The problem is that we need do a post redirect to the bank app with some data received from first app and another data from our system and it isn't possible to use query string args in the URL.

You recomend me to use httpclient, but I think it isn't possible because the last app isn't a ws and i'm not sure if I can use it to redirect web traffic from users browser

As I told you I'm using a jsp that writes a http post form with a auto submit in body load. By the way, 2 parameters are for response URL when ok or ko

This way works, but... I would like to know if there are any other ways to do that

I hope you understand me, maybe my english isn't so good. I'm sorry

Thanks for all
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carlos Calvo Garcia-Cuerva wrote:Hi friends

I have a problem that I don't know how to resolve. Well I have a solution, but I don't like so much.

Well, my app is between two external apps. This app receive a post request and I have to modify this request adding some parameters, and then send a post redirect to the final app with this parameters. The final app only accept post method, I can't use query string parameters. The user need navigate with his browser from requested app to final app, because he need to answer some questions in the final app. These 3 apps are in different servers.

I only found a solution... Althought as I told you before, I don't like so much. The solution is develop a jsp that writes a form post with all parameters and auto-submit method in body load.

what do you think? Is the only way?

Thanks



Use HTTP Client
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic