1

I moved all my included files into a directory /include from root. Now, when I name those files .jsp they are all included properly:

<jsp:include page="/include/default.jsp"></jsp:include>

But these files are fragments, thus I want to rename them to .jspf. In this case, the entire content is just printed to the page, it is not properly interpreted by glassfish.

Do I have to register this type?

Thanks a lot for any kind of hint!

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
John Rumpel
  • 4,535
  • 5
  • 34
  • 48

1 Answers1

0

For those who come across this question, note that the *.jspf convention is not supported by default by all application servers, Tomcat in particular.

The following mapping needs to be added to the application's web.xml in order for jspf to be rendered correctly:

<servlet-mapping>
  <servlet-name>jsp</servlet-name>
  <url-pattern>*.jspf</url-pattern>
</servlet-mapping>
tduchateau
  • 4,351
  • 2
  • 29
  • 40