Not quite sure that I understand what your questions are, but here is my attempt
If there is no servlet for the path, then Apache Sling will determine which "scripting mechanism" to use based on such things as the HTTP request method and extension (.jsp vs .html). See here . It is up to the engine (like the JSP engine or the Sightly engine) to figure out what to do with the request after that.
If you have JSP code written inside a visible file, it will simply be printed in response. I tested this using Sightly Repl on my localhost.
so the spectacular file foo.html
with the contents
<c:set var="foo" value="bar"/> <div>${foo}</div>
The result is in the answer, which is as follows.
<c:set var="foo" value="bar"/> <div></div>
You can see that Sightly does nothing to cut or evaluate the jsp tag. ${foo}
will disappear because there is no visible variable called foo in scope.
Another note. In fact, you can include the JSP file from Sightly.
Here is an example from Adobe docs :
<section data-sly-include="path/to/template.jsp"></section>
source share