1
votes

I was looking over the blog here to understand the concept of SDI+Dispatcher. I enable SSI on apache via using this post & seems it working. But didn't get any material which can demonstrate this concept practically. I am using the same geomatrixx page to where some user logged in and gets cache. How can i store the only static part on the dispatcher cache and how the dynamic component will render at run time. I made changes to my apache conf file as below but now looking over further steps. In blog its also mention to add <!--#include virtual="/includes/header.html" --> so where so i need to add this under body.jsp of page component or somewhere on apache server.

LoadModule dispatcher_module /usr/lib/apache2/modules/dispatcher-apache2.4-4.1.8.so

<IfModule disp_apache2.c>
    <!-- Configurations -->
</IfModule>
 SetOutputFilter INCLUDES
<Directory />

  <IfModule disp_apache2.c>
    SetHandler dispatcher-handler
    ModMimeUsePathInfo On
  </IfModule>
    Options FollowSymLinks Includes
    AllowOverride None

</Directory>

AND

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews Includes
    AllowOverride None
    Require all granted
</Directory>

Thanks

1

1 Answers

0
votes

Sling Dynamic Include automatically replaces components enumerated in the OSGi configuration with the SSI include tag (<!--#include...), so you don't have to write this tag in any JSP.

Open the Apache Felix console, go to the OSGi / Configuration tab and create a new SDI Configuration entry. More information on the configuration properties can be found on the Github. Enter resource types of the components and from this moment (assuming that the dispatcher configuration is OK) they will be replaced with SSI include tags and - as a result - served dynamically even if the whole page is cached.

Aforementioned Github repository contains the most up-to-date documentation of the module.