AEM 6 - invoke Servlet (GET) - servlet as it is not in the list of allowed paths
Hello everyone,
maybe it is a dummy question but I couldn't found a solution until now.
I have this simple Servlet:
@SlingServlet(
paths={"/schafbergbahn/ticker"},
methods = "GET",
metatype=true
)
public class SimpleServlet extends org.apache.sling.api.servlets.SlingAllMethodsServlet {
@Override
protected void doGet(final SlingHttpServletRequest req,
final SlingHttpServletResponse resp) throws ServletException, IOException {
resp.getOutputStream().println(
"This content is generated by the SimpleServlet - QUMA");
}
}
deployed in my AEM 6.2 environment and if I invoke this servlet with
http://localhost:4552/myPath/ticker/
I get a HTTP 403 Forbidden (at bottom).
Does anyone know how I can solve this issue?
Thanks a lot!
Forbidden
Cannot serve request to /myPath/ticker/ in org.apache.sling.servlets.get.DefaultGetServlet
Request Progress:
0 TIMER_START{Request Processing}
0 COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
0 LOG Method=GET, PathInfo=/myPath/ticker/
0 TIMER_START{ResourceResolution}
0 TIMER_END{0,ResourceResolution} URI=/myPath/ticker/ resolves to Resource=ServletResource, servlet=at.my.package.name.core.servlets.SimpleServlet, path=/myPath/ticker
0 LOG Resource Path Info: SlingRequestPathInfo: path='/MyPath/ticker', selectorString='null', extension='null', suffix='/'
0 TIMER_START{ServletResolution}
0 TIMER_START{resolveServlet(/myPath/ticker)} 0 LOG Will not look for a servlet at /myPath/ticker.servlet as it is not in the list of allowed paths
0 TIMER_END{0,resolveServlet(/myPath/ticker)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet
0 TIMER_END{0,ServletResolution} URI=/myPath/ticker/ handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
0 LOG Applying Requestfilters
0 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl 0 LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter
0 LOG Calling filter: com.adobe.granite.rest.impl.servlet.ApiResourceFilter
0 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 0 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter
0 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
0 LOG Calling filter: com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker 0 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
0 LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter
0 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter 0 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet