I am having a JSP, and in my JSP i have to include some part of code, actually i have around 20 JSPs and in all the 20 JSPs i have to include some common code, so what i have done is i have made another JSP and included it in the main JSP, Here am not sure whether to the extension of the included JSP should be .jsp or .jspf.
Can any one please explain what is the difference between the two extensions and what i have to use in the above mentioned scenario.
The knowledge i have is if it is .jsp means server creates _Jsp.java and a corresponding class file for that, please let me know which is better to use and why!
Generally, .jspf is used for JSP fragments that are included via the static include directive. JSP files included via the standard include action are processed as their own page and are given the type .jsp.
Generally, you use the directive to include fragments, which may or may not be complete and parsable JSP files. For example, a prelude that contains taglib directives that you are going to use on all pages (see below for caveat). These includes happen before translation.
The standard action is used to include complete and separately parsable JSP pages at run-time.
That said, I rarely use either anymore. I use a prelude defined in the deployment descriptor to prefix all pages with common directives, and custom actions or tag files to share common code.