This thread may help.
http://www.pubbs.net/201009/tomcat/979-question-on-ssi.html

On Thu, Sep 9, 2010 at 10:09 PM, jeffo1b <j...@selectenergypartners.com> wrote:
>
>
>
> Christopher Schultz-2 wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Jeff,
>>
>> On 9/8/2010 7:46 PM, jeffo1b wrote:
>>> Finally, i have a file called test.shtml that has the following code:
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>> "http://www.w3.org/TR/html4/loose.dtd";>
>>> <html>
>>> <head>
>>> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>>> <title>tester</title>
>>> </head>
>>> <body>
>>> hi there
>>> <!-- #include file="/inc.html" -->
>>> </body>
>>>
>>> The "inc.html" file is in the same directory as the test.html file.
>>
>> You meant test.shtml, right?
>>
>>> when I run the file, i simply see the "hi there" and none of the
>>> contents of the inc.html file.
>>
>> How do you request (not "run") the file? What is the URL?
>>
>> What is the contents of the file? Do you get the <!-- #include ... -->
>> still in the file? If that's the case, then either the SSI filter isn't
>> running at all, or your syntax is incorrect. I'm not sure how picky the
>> SSI parser is, but it appears that you have this:
>>
>> <!-- #include file="/inc.html" -->
>>
>> and the parser is looking for this:
>>
>> <!--#include file="/inc.html" -->
>>
>> Also, the (Apache httpd) documentation for #include /file/ is to a
>> relative path /on the disk/ which would suggest that /inc.html would
>> have to be put into your server's root directory. Probably not a good
>> idea. Instead, try using /virtual/ like this:
>>
>> <!--#include virtual="inc.html" -->
>>
>> This is also a relative path, but it's relative to the current URL, so
>> if you request http://host/app/test.shtml, it will include
>> http://host/app/inc.html
>>
>>> 1.  i don't have the invoker servlet un-commented.  is this required?
>>
>> No. You must choose between the "filter" and the "servlet"
>> implementations. Actually, I don't see why you couldn't use both
>> simultaneously, but they recommend against using both.
>>
>>> 2.  i got totally lost on the reg -exp discussions.  i am not in the IT
>>> world and it was simply beyond my skill set.
>>
>> You might need to get someone else to configure this for you, then.
>>
>> For now, set the regular expression to ".*" (without quotes, of course).
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkyJM8UACgkQ9CaO5/Lv0PBa6ACghr7EdFCN0nJtUBb0sTfOz6ZN
>> qGsAnRox5ShzLC4OZoHMhkbr7vusG9HP
>> =3Elg
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
> I'm sure it was a combination of both, but I changed <!-- #include
> file="/inc.html" --> to <!--#include virtual="inc.html" --> and it worked!
>
> Thank you, and apologies for the poor use of terminology nomenclature.
>
> Now, if I can just figure out how to do recursive .jsp includes...
> --
> View this message in context: 
> http://old.nabble.com/Problems-with-SSI-tp29645512p29670889.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to