Page 1 of 1

Passing parms back to a java program

Posted: Fri May 20, 2011 10:54 am
by Jim Reed
Is it possible to pass parms back to a java program that starts a session? The java program is using a javascript to open a new window, and pass three parms.

Re: Passing parms back to a java program

Posted: Fri May 20, 2011 11:35 am
by David
By Java application, I guess you mean a web application?

The only way you can get parameters back to it is by using "window.opener" in JavaScript in the PUI window. This returns a reference to the opener window object. From there, you can set values in the opener window by using JS window-level variables or by altering elements in the document using the DOM.

If your browser sees the 2 windows as being on different sites (i.e. different http servers), it may see the "window.opener" reference as an attempt at cross-site scripting and prevent it -- you'd just have to try it out.

If it does prevent you from doing this, you'd probably need to map URLs on the Java app's http server to the Profound UI server so that the browser sees it as the same site.

I'm not sure what you're using over there, but if it's Apache HTTPD, you can use ProxyPass directives to do this. You can map "path" /profoundui to the PUI http server. If you are using WebSphere or Tomcat over there, without an Apache server, they probably have similar features.