• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Outputting dynamic HTML frames from a servlet

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
Not sure if this is the right place to post this question but...
I have a servlet which outputs a frameset, composed of two frames, each of which has to be generated dynamically depending on previous user input.
Now, I don't know much about frames which is what my question is about. My servlet currently creates the dynamic content for each frame, writes it to two HTML files which I use as the frames, and then makes a frameset which refers to these two files.
I've been told that writing out to these HTML files in order to result in dynamic HTML being output from my servlet "feels a bit weird", something to do with security, I guess.
However, I couldn't see any other way of making a frameset without it having to reference two actual HTML files. Does anyone know if there's a way I could e.g. give the frameset two strings containing the HTML instead?
Any suggestions would be greatly received,
Gillian Klee
For reference, my frameset HTML is along these lines:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows="115,*" cols="*" framespacing="0" frameborder="yes" border="0">
<frame src="topFrame.html" name="topFrame" scrolling="NO" noresize >
<frame src="mainFrame.html" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gillian
An alternative way would be to set the src of the frames in your framest to reference URL's that are servlets rather than physical files. These servlets would then dynicamically generate the content.
HTH
Andy
 
Gill Clover
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andy,
Thanks for you help, I didn't know you could do that. I'll give it a go.
Gillian
 
Die Fledermaus does not fear such a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic