Dispatcher | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

tb1687196
Level 2
September 1, 2022

Hi @julianoalvess ,

By mistake I clicked on me too. Please ignore ;).

It would be better if you kindly elaborately say what exactly is your issue with an example, it will help to identify the problem. 

If you want your pages ( with requests from API) should't come with .html, how exactly the response bothering you in dispatcher.

Pradeep_Kumar_Srivastav
Community Advisor
Community Advisor
September 2, 2022

Hi @julianoalvess , Can you please check if the API request has sling.servlet.extensions="+ "html" in the code.

VeenaVikraman
Community Advisor
Community Advisor
September 2, 2022

How are you making the API call ? Can you share some sample code ?

HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 2, 2022

Are you using sling.servlet.extensions as html in your servlet?

@Component(service=Servlet.class,
           property={
                   Constants.SERVICE_DESCRIPTION + "=Simple Demo Servlet",
                   "sling.servlet.methods=" + HttpConstants.METHOD_GET,
                   "sling.servlet.resourceTypes="+ "demoproject/components/structure/page",
                   "sling.servlet.extensions=" + "html"
           })
September 2, 2022

No, It can be the dispatcher, with these rules: PS: Only call API 

 

RewriteCond %{REQUEST_URI} !^/content/dam/.*
RewriteCond %{REQUEST_URI} !.*\..*$
RewriteCond %{REQUEST_URI} !.*/$
RewriteCond %{REQUEST_URI} !^/saml_login
RewriteCond %{REQUEST_URI} !^/bin
RewriteRule ^/(.*)$ /content/prudential/home/$1.html [PT,L,QSA]