General discussion

Locked

Building frames with servlets

By piponline ·
I'm building a web application and I need to figue out how to create dinamically a HTML page, say with two frames.
The content of both frames is dependent of the user profile so they have to be build dinamically.
Any suggestions?
Thanks.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Building frames with servlets

by Jay Eckles In reply to Building frames with serv ...

The first call to one servlet will create the frameset page and the src of the individual frames will be either to that servlet again with a parameter to indicate that this is the call to create the frame contents or to a separate servlet:
<frameset ...>
<frame name="frame1" src="http://server/servlet?mode=frame1" ...>
<frame name="frame2" src="http://server/servlet?mode=frame2" ...>
</frameset>

There's no way for a single call to a servlet to create both the frameset and the frame contents on the fly. This is because the browser will make separate requests for the frameset and each frame, so the servlet has to make multiple reponses. As you know, webservers only deal with one request and make one response at a time.

If you need to pass information from one servlet to another in this process, you've got a couple of options...one is to store the data in a session variable and make the two servlets part of the same application. Another is to pass information on the query string.

Let me know if you need any more help.

Jay Eckles
www.jayeckles.com

Collapse -

Building frames with servlets

by piponline In reply to Building frames with serv ...

Ok, thank you!
I got it.

Collapse -

Building frames with servlets

by piponline In reply to Building frames with serv ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums