As others have noted, .jspf files are JSP fragments. They are intended to be statically included in another JSP file that is not compiled on its own:
<%@include file="/WEB-INF/jspf/example.jspf" %>
You will notice that this example comes from the directory /WEB-INF/jspf . This means that it is not available outside the web application; there is no way to create a url that can get it. If you put them in the same directory as the "regular" JSP files, you can create such a URL; Tomcat, for example, will retrieve the page as a text document. However, the front-end web server may block these URLs.
I like JSPF files as a first step in refactoring large JSP pages . Since they are statically included, you can extract a small fragment of the file without providing scripts or variables, which leads to pages that are somewhat more convenient to maintain (and I want to emphasize that this is the first step: dynamic inclusion and taglibs are usually the best long-term solution). When refactoring, I find the fragments are close to their parent files; this is when using a web server to block URLs becomes useful.
kdgregory Jan 17 '10 at 13:16 2010-01-17 13:16
source share