A jspf file is a file that is supposed to be statically included, using an include directive:
<%@ include file="someFile.jspf" %>
That's just what a JSP fragment segment is, and since it's supposed tobe statically included, there is no point in compiling it.
Here's what the spec says:
By default the extension .jsp means a top-level JSP file. We recommend, but do not mandate, to differentiate between top-level JSP files (invoked directly by the client or dynamically included by another page or servlet) and statically included segments so that:
- The .jsp extension is used only for files corresponding to top level JSP files, forming a JSP page when processed.
- Statically included segments use any other extension. As included segments were called ‘JSP fragments’ in past versions of this specification, the extension .jspf was offered as a suggestion. This extension is still suggested for consistency reasons, despite that they are now called ‘jsp segments’.
If you want to dynamically include it, then it must have the .jsp
extension. But in this case, I don't see why you wouldn't use a static include.