File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Multiple Frames Updated by One Servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Multiple Frames Updated by One Servlet?" Watch "Multiple Frames Updated by One Servlet?" New topic

Multiple Frames Updated by One Servlet?


Joined: Sep 24, 2000
Posts: 4
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

Joined: Mar 22, 2000
Posts: 12761
Here is a note on that which I clipped from the 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:
<FRAME SRC="/servlet/MyServlet?frame=1" NAME=... >
<FRAME SRC="/servlet/MyServlet?frame=2" NAME=... >
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
--- endquote

Joined: Sep 24, 2000
Posts: 4
Thanks a lot I came to the same conclusion.
I agree. Here's the link:
subject: Multiple Frames Updated by One Servlet?
Similar Threads
Multipe Frames to front
how to reuse the java bean in parent page
returning the result in different frame
jsp + frames
HTML Frames and JSP!