• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic