• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!