wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to pass values from one application to other application via post method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to pass values from one application to other application via post method" Watch "How to pass values from one application to other application via post method" New topic
Author

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

chennai Kumar
Ranch Hand

Joined: Jun 04, 2005
Posts: 70
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
Greenhorn

Joined: Nov 21, 2010
Posts: 28
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.




SCJP 5.0 OCBCD 5.0(Formerly SCBCD)
chennai Kumar
Ranch Hand

Joined: Jun 04, 2005
Posts: 70
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
Greenhorn

Joined: Nov 21, 2010
Posts: 28
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

Joined: Jun 04, 2005
Posts: 70
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass values from one application to other application via post method
 
Similar Threads
Struts 2 : file upload
getting parameterValues from a separate frame
how to get QueryString before Post request?
Transfer the variable value from one jsp page to other
html+applet+servlet=how to do