tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffo1b ...@selectenergypartners.com>
Subject Re: Problems with SSI
Date Thu, 09 Sep 2010 20:09:50 GMT



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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message