Expand my Community achievements bar.

OSGi.annotations best practices for Servlet's

Avatar

Former Community Member

Just getting up to speed with the new annotations(finally abandoning scr, already missing @SlingServet ), what is the preferred approach for writing meta-type annotations for Servlets.

Let's say I wanted to create servlet for following asset:

/content/dam/lifestyle-images/personal/savings/sav_isas_3_1.large.medium_quality.jpg

How does best practice implementation looks here?


Regards,

Peter

2 Replies

Avatar

Level 10

Read this: Apache Sling - Servlets and Scripts

Looks like you want to bind a servlet to content. In this case - you want to bind a servlet to a resource sling.servlet.resourceTypes.

Avatar

Former Community Member

Sure, will do.

Thank you, Scott.

Regards,

Peter