You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ju...@apache.org on 2018/09/12 11:26:09 UTC

[sling-site] branch asf-site updated: correcting artifactId for SDI

This is an automated email from the ASF dual-hosted git repository.

justin pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 903e21c  correcting artifactId for SDI
903e21c is described below

commit 903e21c196160cd40cac1d443ce3c8b1d254edca
Author: Justin Edelson <ju...@justinedelson.com>
AuthorDate: Wed Sep 12 07:26:00 2018 -0400

    correcting artifactId for SDI
---
 documentation/bundles/dynamic-includes.html |  4 +--
 documentation/the-sling-engine/filters.html | 46 ++++++++++-------------------
 2 files changed, 18 insertions(+), 32 deletions(-)

diff --git a/documentation/bundles/dynamic-includes.html b/documentation/bundles/dynamic-includes.html
index 0a3f2f1..2a555e4 100644
--- a/documentation/bundles/dynamic-includes.html
+++ b/documentation/bundles/dynamic-includes.html
@@ -104,7 +104,7 @@
 <p>Add following dependency to your project:</p>
 <pre><code>&lt;dependency&gt;
     &lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
-    &lt;artifactId&gt;dynamic-include&lt;/artifactId&gt;
+    &lt;artifactId&gt;org.apache.sling.dynamic-include&lt;/artifactId&gt;
     &lt;version&gt;3.1.2&lt;/version&gt;
 &lt;/dependency&gt;
 </code></pre>
@@ -234,7 +234,7 @@
 </ul></section></div></div>            
             <div class="footer">
 <div class="revisionInfo">
-                    Last modified by <span class="author">Tomek Niedzwiedz</span> on <span class="comment">Mon Aug 20 21:32:43 2018 +0200</span>
+                    Last modified by <span class="author">Justin Edelson</span> on <span class="comment">Wed Sep 12 07:24:29 2018 -0400</span>
                 </div>                <p>
                     Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
                 </p><p>
diff --git a/documentation/the-sling-engine/filters.html b/documentation/the-sling-engine/filters.html
index e8251ec..cccd13f 100644
--- a/documentation/the-sling-engine/filters.html
+++ b/documentation/the-sling-engine/filters.html
@@ -174,42 +174,28 @@ from our integration tests shows an example Sling Filter.
 </table>
 <h2><a href="#slingservletfilter-annotation" name="slingservletfilter-annotation">SlingServletFilter Annotation</a></h2>
 <p>Coding the above being a bit tedious, <code>Apache Sling Servlets Annotations 1.1.0</code> provides handy `SlingServletFilter annotation to set those values:</p>
-<pre><code>    [...]
-   import org.apache.sling.servlets.annotations.SlingServletFilter;
-   import org.apache.sling.servlets.annotations.SlingServletFilterScope;
-   import org.osgi.service.component.annotations.Component;
-    [...]   
-   @Component
-   @SlingServletFilter(scope = {SlingServletFilterScope.REQUEST},
-                       suffix_pattern = &quot;/suffix/foo&quot;,
-                       resourceTypes = {&quot;foo/bar&quot;},
-                       pattern = &quot;/content/.*&quot;,
-                       extensions = {&quot;txt&quot;,&quot;json&quot;},
-                       selectors = {&quot;foo&quot;,&quot;bar&quot;},
-                       methods = {&quot;GET&quot;,&quot;HEAD&quot;})
-   public class FooBarFilter implements Filter {
+<p>``` ...  import org.apache.sling.servlets.annotations.SlingServletFilter;  import org.apache.sling.servlets.annotations.SlingServletFilterScope;  import org.osgi.service.component.annotations.Component; ...<br/> @Component  @SlingServletFilter(scope = {SlingServletFilterScope.REQUEST},  suffix_pattern = "/suffix/foo",  resourceTypes = {"foo/bar"},  pattern = "/content/.*",  extensions = {"txt","json"},  selectors = {"foo","bar"},  methods = {"GET","HEAD"})  public class FooBarFilter i [...]
+<pre><code>   @Override
+   public void init(FilterConfig filterConfig) throws ServletException {
 
-       @Override
-       public void init(FilterConfig filterConfig) throws ServletException {
-
-       }
+   }
 
-       @Override
-       public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-           SlingHttpServletResponse slingResponse = (SlingHttpServletResponse)response;
-           //will only be run on (GET|HEAD) /content/.*.foo|bar.txt|json/suffix/foo requests
-           //code here can be reduced to what should actually be done in that case
-           //for other requests, this filter will not be in the call stack 
-           slingResponse.addHeader(&quot;foobared&quot;, &quot;true&quot;);
-           chain.doFilter(request, slingResponse);
-       }
+   @Override
+   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+       SlingHttpServletResponse slingResponse = (SlingHttpServletResponse)response;
+       //will only be run on (GET|HEAD) /content/.*.foo|bar.txt|json/suffix/foo requests
+       //code here can be reduced to what should actually be done in that case
+       //for other requests, this filter will not be in the call stack 
+       slingResponse.addHeader(&quot;foobared&quot;, &quot;true&quot;);
+       chain.doFilter(request, slingResponse);
+   }
 
-       @Override
-       public void destroy() {
+   @Override
+   public void destroy() {
 
-       }
    }
 </code></pre>
+<p>} ```</p>
 <h2><a href="#filter-chains" name="filter-chains">Filter Chains</a></h2>
 <p>Sling maintains five filter chains: request level, component level, include filters, forward filters and error filters. Except for the component level filter these filter chains correspond to the filter <code>&lt;dispatcher&gt;</code> configurations as defined for Servlet API 2.5 web applications (see section SRV.6.2.5 Filters and the RequestDispatcher).</p>
 <p>The following table summarizes when each of the filter chains is called and what value must be defined in the <code>sling.filter.scope</code> property to have a filter added to the respective chain:</p>