Hi,
I have a frameset that has two frames. Each frame should receive dynamic data from the server side. So I use Servlet0 to print the frameset to the client, Servlet1 and Servlet2 to print data to Frame1 and Frame2 within the frameset separately:
-------------------
In Servlet0:
.............
buffer.append("<frameset cols=\"400,*\" frameborder=\"YES\" border=\"0\" framespacing=\"0\">");
buffer.append("<frame src=\"Servlet1\" name=\"Frame1\" scrolling=\"YES\" noresize>");
buffer.append("<frame src=\"Servlet2\" name=\"Frame2\">");
buffer.append("</frameset>");
writer.println(buffer.toString());
......
In Servlet1:
I print some links which can retrieve data from the server through calling Servlet0 again
..........
buffer.append("<a href = \"Servlet0\">link1</a>");
writer.println(buffer.toString());
..........
In Servlet2:
I need to print some data depending on link1, which means it can be different each time user activates a different link.
..........
buffer.append("some data");
writer.println(buffer.toString());
..........
The problem I encounter now is:
When I call Servlet0, Frame1 can show correct information each time, but Frame2 only shows correct information for the very first time and does not change to show correct information even the user click a different link in Frame1. However, Servlet2 (which writes to Frame2) collects correct information each time.
Could anyone give some suggestion? I use
Tomcat 4 to
test my application. Thank you for your help.
Sue