This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Include HTML files?  RSS feed

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
you can look at this,... http://www.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
 
The only cure for that is hours of television radiation. And this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!