users@glassfish.java.net

cannot make html include to work

From: Shing Wai Chan <Shing-Wai.Chan_at_Sun.COM>
Date: Fri, 21 Aug 2009 14:55:54 -0700

Do you see any error messages in the server.log?
For the first one,

<!--#include file="/test.shtml"-->

The file attribute is relative to document path. I don't think one can
use "/" there.

You may like to try those include one by one.
Regards,
       Shing Wai Chan

>
> -------- Original Message --------
> Subject: cannot make html include to work
> Date: Fri, 21 Aug 2009 07:23:45 -0700 (PDT)
> From: glassfish_at_javadesktop.org
> Reply-To: users_at_glassfish.dev.java.net
> To: users_at_glassfish.dev.java.net
>
>
>
> Is there anybody who can hint me on how to make html include work on Glassfish V2 and or V3. I tried both servers, but without any luck.
>
> Here is the section of my web.xml file for activating the ssi servlet :
> <servlet>
> <servlet-name>ssi</servlet-name>
> <servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class>
> <init-param>
> <param-name>debug</param-name>
> <param-value>1</param-value>
> </init-param>
> <init-param>
> <param-name>isVirtualWebappRelative</param-name>
> <param-value>true</param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>ssi</servlet-name>
> <url-pattern>*.shtml</url-pattern>
> </servlet-mapping>
> <mime-mapping>
> <extension>shtml</extension>
> <mime-type>text/html</mime-type>
> </mime-mapping>
>
> and here is the snippet that I tried to include :
> <!--#include file="/test.shtml"-->
> <!--#include virtual="/header.shtml"-->
> <!--#include file="test.shtml"-->
> <!--#include virtual="header.shtml"-->
> <!--#include file="/includes/test.shtml"-->
> <!--#include virtual="/includes/header.shtml"-->
> <!--#include file="includes/test.shtml"-->
> <!--#include virtual="includes/header.shtml"-->
> <!--#include file="test.html"-->
> <--#include virtual="header.html"-->
>
> Of course, all these files exist and are deployed in a war file through Netbeans.
> I created a fresh Glassfish domain, and my default-web.xml file is untouched.
>
> Greetings from Belgium, erik.
> [Message sent by forum member 'erikicket' (erikicket)]
>
> http://forums.java.net/jive/thread.jspa?messageID=361615
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>