tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Problems with SSI
Date Thu, 09 Sep 2010 19:21:41 GMT
Hash: SHA1


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"
> "">
> <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

> 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
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message