aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Including xhtml (html) into another xhtml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Including xhtml (html) into another xhtml file" Watch "Including xhtml (html) into another xhtml file" New topic
Author

Including xhtml (html) into another xhtml file

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Simple question really, how do you include a html file into a xhtml file?

I have seen plenty of examples that say use this:



But when I try it I get nothing, the 'comment' is in the page source hut the content of the header.html page isn't displayed in the xhtml page.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Is your server set up to do SSI [Server Side Includes]? Most servers require it to have the extension shtml if it is enabled.

Eric
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
I'm using Glassfish which supports SSI but I think I need some config in my web.xml, I found this on the Shing Wai Chan - Blog



Also I have to have 'virtual' path (<!--#include virtual="/pages/common/header.html"-->) else I get the "A non-virtual path can't be absolute" error

I've just added extensions for xhtml in the url-pattern and mime-mappin extensions
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Just found that I have already posted a query abotu this, so I'll just update it.

This is being used under a Glassfish v3 server...
Basically this has not et been resolved, I have the web.xml params as below and the xhtml include as shown, but I see nothing from my 'child' xhtml in my 'parent' xhtml page.





Really frustrating as all the example just implly that it will simply work, this clearly is not the case.

Cheers in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61755
    
  67

Moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Including xhtml (html) into another xhtml file