• 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

Include HTML files?

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have some HTML code that needs to be used in a couple different files. I have thought about putting this HTML code into jspf (jsp fragment files) and including them into each HTML page. To do this, though, I'd need to convert all the HTML pages to JSP's. This seems excessive because the content is static, not dynamic, and therefore doesn't warrant JSP files. Furthermore, creating the context as JSP files requires that the pages be compiled which is not necessary. I'd like to know if there is a way to include HTML fragments into HTML files. If so, what code do I use to include the HTML fragments into the HTML files? How should the included HTML fragments look?
Thanks in advance.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can look at this,... https://coderanch.com/t/113810/HTML-JavaScript/including-html-doc-within-another

or you could do iframes and just include them on the page as html files.. all modern browsers support iframes...This was you would be able to include html documents, but it is a bit messy.
Eric
 
brevity is the soul of wit - shakepeare. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic