• 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

how to include html file?

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

i am new to the css world. basically i am designing a website where i have a footer which is defined in a separate file called footer.html. I have a home page called home.html and i want to include the footer in the home.html. Both files home.html and footer.html are found in a folder called WebApp.

I have tried to put the following code in my home.html file to call the footer but nothing is displayed


Any suggestion please?

I am using eclipse IDE and Apache Tomcat Server 6 to execute the html file.

Thanks in advance.
 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
where do you've got that syntax from?
Is the page where you are trying this in an html file or something else like asp?
 
ashley Jug
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Helo,

Thanks for your response,I got the code from an online tutorial(http://dimaroan.home.xs4all.nl/htl/faq15.html) but cannot display the footer
It is an html file.
Thanks in advance.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no way in pure HTML to perform an inclusion.

Are you using any server-side tempting such as JSP, ASP or PHP? Those have include mechanisms.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache also provides a server-side include mechanism that must be enabled before it can be used.
 
ashley Jug
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for the response, instead of html,as you suggested i am using jsp where i can use include file. Regarding Apache the server-side include mechanism is there any online resources where i can learn how to do it?

Thanks again it was very helpful and learning also.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using JSP, just use one of the JSP include directive or action.
 
reply
    Bookmark Topic Watch Topic
  • New Topic