Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass values from one application to other application via post method

 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Could you please answer how to pass values from one application to other application via post method ( not in query string)

My requirement:

I have two applications, From the application A while clicking the button opening application B in the popup window, i am doing some configuration in application B , after submit the button goes to application A.

I am using window.opener.location.href= hostname and path, while i submit the button in application B need to pass values from application B to application via post. If i used query string in the URL it's working fine but i need to pass the value by post method. How can we achieve this requirement.

Thanks and Regards,
RAM KUMAR
 
Vijay Vishwa
Ranch Hand
Posts: 40
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ram Kumar,

Looking at you question, I understant that Application B is opened in new Popup window (child window).
And upon submitting the Applicaiton B, it is submitted to Application A and Application B popup is closed.

Do you really want submit from Application B to Applicaiton A.

I mean that, Javascript provides window object to work between 2 forms (parent the opener of new window AND child the new window)



window.opener is reference to the parent window and you can access all elements of App A document.

What above code doing is putting the value from App B form to App A form. And ofcoure the above code is in JS function which is called onclick of button
After putting the value. Close the window.



 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vijay Vishwa for your suggestion, I have to ask application A to create some hidden field to read the data.

But they are asking us to share the value in the request via POST method. So i like to know how to pass the value in application A by POST method.

Thanks and Regards,
RAM KUMAR
 
Vijay Vishwa
Ranch Hand
Posts: 40
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You siad that by query string its working, that means forms method is set to GET. Have you tried settting forms method to POST


If the forms method is set to POST then values will not go by query string.
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i submit the value in application B like below, in the same popup window opening the application A. Here i dont want to open the application B in the same popup window it should redirect to application A ( already opened the window)



Thanks and Regards,
RAM kumar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic