• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Frames Updated by One Servlet?

 
Chentzen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application in which:
Frame1 issues the request.
Servlet does it's thing.
Frame1,Frame2,Frame3 need to be updated based upon Servlet data.
I don't know how to get multiple frames to be updated by one servlet. Any ideas will be helpful I'm at a loss right now.
Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a note on that which I clipped from the comp.lang.java.programmers newsgroup. It was originally written by Phil Hanna.
"Yes, it works. <FRAME SRC="/servlet/MyServlet"> will invoke MyServlet
at its doGet() method, just as it would if it were in a hyperlink that
was clicked, like <A HREF="/servlet/MyServlet">click here</A>. If the
servlet is not already loaded, the init() method is called first - no
different than any other servlet invocation.
A neat trick is to have the *same* servlet generate the <FRAMESET> and
each of the frames:
<FRAMESET>
<FRAME SRC="/servlet/MyServlet?frame=1" NAME=... >
<FRAME SRC="/servlet/MyServlet?frame=2" NAME=... >
...
</FRAMESET>
Check the "frame" parameter at the top of the doGet() method. If it is
null, generate the <FRAMESET> block, otherwise, generate frame 1, 2, or
whatever.
--- endquote
 
Chentzen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot I came to the same conclusion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic