If you use some kind of framework, for example, Struts2, you will have an extension (* .action or whatever) associated with the dispatcher servlet. The dispatcher "forwards" the request to the JSP, which is located in the WEB-INF directory. Users only see the URL that was directed to the servlet and return the HTML. They cannot say what a template language is. Since you can choose whatever you like to map servlets to, you can do something or even incorrectly direct them to something like ".php" or ".asp".
Of course, you can have some JSPs right in the web application directory, and not in WEB-INF. You can give them another extension and tell the container to treat them as a JSP by creating <jsp-property-group>with an element url-patternthat indicates a fake extension in web.xml.
, , , . , , - cookie , "jsessionid". , Servlet, .