SSI (Server Side Include) on Tomcat with Eclipse

My development platform is Eclipse + Tomcat. To leverage SSI, I had to do some special configuration to the Tomcat server (in production, mostly we use Apache). Here is the how to
Basically, modify the $CATALINA_BASE/conf/web.xml to un-comment the SSI servlet or filter. And make sure to add privileged=”true” to the context.xml

HOWEVER, if you are using Eclipse (and very possibly), and if you ALREADY created a server,  modifying your Tomcat installation will not work – because when you create a server in Eclipse, Eclipse copied the web.xml (and other xmls) from tomcat to a server profile directory under “/workspace/server”. And each time you start the server, Eclipse will then copy files from this profile directory to run-time temporary for example: workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1

So, the easy way to use SSI on Tomcat – first modify the web.xml and context.xml in the Tomcat installation directory, then, create a new server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s