jsp - Why does tomcat includes *.jspf fragments as static text while jetty processes them dynamically? -


i developing toy project using jetty maven plugin , executing goal jetty:run. decided check how works on tomcat.

i have 2 jspf fragments: header.jspf , footer.jspf inside of web-inf/jspf/ containing common code of jsp pages. include fragments this:

<jsp:include page="web-inf/jspf/header.jspf" flush="true">     <jsp:param name="pagetitle" value="customer registration"/> </jsp:include> 

jetty processed them dynamic fragments, while tomcat processed them static text, that's why can see:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 

in beginning of web page in browser. issue tomcat solved renaming: *.jspf *.jsp. question is: why different servlet containers act differently? performed tests on tomcat 8/9 , jetty 9.3.7.

add new file extension mywebapp/web-inf/web.xml file. why tomcat not default don't know. defaults in conf/web.xml file edit well. servlet engine may use different servlet name tomcat solution.

<servlet-mapping>     <servlet-name>jsp</servlet-name>     <url-pattern>*.jsp</url-pattern>     <url-pattern>*.jspf</url-pattern> </servlet-mapping> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -