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

What are the implicit, internal el jsp objects and their differences from jsp objects?

514


What are the different types of jsp directive?

514


How is jsp better than servlet technology?

544


What do you mean by jstl?

529


What is _jspservice method?

514






What is jsp and its architecture?

511


Give an example of using your own tags.

517


Which jsp method cannot be overridden?

518


Can constructor be used instead of init(), to initialize servlet?

506


What do you know about jsp tags? Explain how you understand the action tag and jsp action elements.

569


What is a jsp and what is it used for?

525


Explain the difference between include directive and include action in jsp?

518


How can we stop errors on display in a jsp page?

516


how to insert star image and need to rate it.. one star two star so on how to do in jsp...????

1771


What is a hidden comment in jsp?

483