What's the difference between an import and include directive,
and also the difference between include directive and
include action?

Answer Posted / vasanth

import directive is used to import any java classes into the jsp. eg : import java.lang.String, whereas include directive is used to include a content of another jsp.

'include' directive is used to include content from a jsp which is static for ever once the jspServlet created for it. The include jsp will not compipled each and every time it gets loaded Header and footer jsps can be included in this method.

If any jsp is included thru include action, the content of the jsp will be compiled and the respective output will be generated and rendered to the including jsp each and every time the including jsp is getting loaded.

Is This Answer Correct ?    23 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why jsp is used in java?

659


What will happen if iselignored attribute is set as false?

674


Why does jcomponent have add() and remove() methods but the component does not?

674


How many jsp scripting elements are there and what are they?

756


What is jsp index?

695


Show attributes of page directives.

757


What is the jspinit() method?

718


What are different implicit objects of jsp?

688


Is jsp a front end?

753


Perform a browser redirection from a jsp page?

746


Hi, I've applied for HPCL(Information System Officer)& UIIC (A).Plz send me previous/sample papers and any suggestions regarding this exam.Please advice me good study material or related links. Thanks in advance shyam shyamprasad71@gmail.com

2193


Can an interface be implemented in the jsp file?

738


Can we implement an interface in a jsp?

771


What are directives in jsp?

734


What are standard actions in JSP?

722