Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Sling Filters Usage

Avatar

Community Advisor

Hi All,

I want to know what is specific usage of the sling servlet filters can someone porvide any example in real world scenario.

 

Thanks,

Mani Kumar

1 Accepted Solution

Avatar

Correct answer by
Level 9

Here is a good article on this topic.

"Sling filters are basically OSGi services which are implementing javax.servlet.Filter interface. They are mostly used for authentication of request, post processing of markup or adding/modifying some request parameters etc. Sling supports filters by applying filter chains to the requests before actually dispatching to the servlet or script for processing."

http://hashimkhan.in/aem-adobecq5-code-templates/filters/

Jitendra

korthivada wrote...

Hi All,

I want to know what is specific usage of the sling servlet filters can someone porvide any example in real world scenario.

 

Thanks,

Mani Kumar

 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

Here is a good article on this topic.

"Sling filters are basically OSGi services which are implementing javax.servlet.Filter interface. They are mostly used for authentication of request, post processing of markup or adding/modifying some request parameters etc. Sling supports filters by applying filter chains to the requests before actually dispatching to the servlet or script for processing."

http://hashimkhan.in/aem-adobecq5-code-templates/filters/

Jitendra

korthivada wrote...

Hi All,

I want to know what is specific usage of the sling servlet filters can someone porvide any example in real world scenario.

 

Thanks,

Mani Kumar

 

Avatar

Community Advisor

Thanks Jitendra can you provide any real time scenario example 

Avatar

Level 9

 Let's suppose, you want to meet any govt officer and before meeting to him, you have to go through peon (big boss) and he will do the checks before granting permission to you. 

In similar fashion, any request comes to AEM system, go through these filters and these filters do the verification of the call.

Jitendra

korthivada wrote...

Hi All,

I want to know what is specific usage of the sling servlet filters can someone porvide any example in real world scenario.

 

Thanks,

Mani Kumar