nirjari patel wrote:Is there any diference in coding of JSP and JSPF ?
A jspf doesn't need to be a complete and sytnax-complete JSP, as it is statically included in a JSP (that does need to be complete).
If I want to give JSPF extension to a JSP page, will that work ?
Of course not. Why would you do such a thing?
do I need to code JSP page in a certain way in order to call it JSPF ?
The JSP simply uses the include directive to include the fragment.
We can just create JSP page and include it in another JSP page with include action (oe whatever legal way).
Yes, you can do that. But in the case of the include action, the included JSP must be syntax-complete.
By that I mean , can a JSPF be used independently on its own ?
I am working on Interwoven CMS in which we have two programs. One is outputting JSP page and other code is outputting JSPF page. Now when I click on JSP page, I can seethe final output, how it will look in webpage. Nut when I click om JSPF, I get an error "Oops! This link appears to be broken.".
So now I am thinking, is it allowed to use JSPF without embedding or calling it in JSP page ?
Kind of like struts uses the ".do" extension, and we use 'i' for a loop variable.
The JSPF extension is an indication to the programmer that
"This file is a fragment of a JSP and will only be used via <%@ include %> in other JSPs"
There is nothing mandatory about this. You don't have to use the JSPF extension. You can include any file you like with the <%@ include %> directive.
It is merely a defacto standard that has emerged of "this is the way we do things around here".