Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing request parameter/attributes in IFRAME

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Please consider the following scenario and provide your inputs -

1.) I have a website for example http://www.parent.com and I open it in FireFox 3.5.

2.) I need to open different website servlet http://www.child.com/queryservlet, inside an IFRAME tag in http://www.parent.com/query.jsp page

3.) I need to pass some request/session parameter/attribute{for example name=test} to http://www.child.com/queryservlet

4.) based on parameter passed in step 3, http://www.child.com/queryservlet needs to return back the control to http://www.parent.com/query.jsp along with the result of the processing based on the parameter passed in step 3{for example - result=pass}



I am not sure if a session is same inside different application opened inside an IFRAME tag.

Kindly suggest the best possible option- whether to use session or request scope variables

Also, suggest is it safe to communicate between 2 different applications like the above mentioned way?

Thanks,
Neeraj.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I think you are talking about two different web applications on two totally different machines. In that case the only way to pass arguments is passing them in the query string (as if you opened the website yourself in the browser), or generating a POST request.

Your example however (since you want some information back from the other site) pretty much sounds like a candidate for a webservice.
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. both are differnet applications hosted on different machnies.



thanks
Neeraj.
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to implement the above scenario in using request parameters.

For testing purpose I am trying to use Paros Proxy server to intercept request and change the parameters at runtime. But the iframe containing the Application B does not open up, when I send my request using Paros as proxy server.

If I use normal internet connection settings, both application communicate between themselves very well.

Any inputs will be a great help in this matter.

Thanks
Neeraj.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic