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
What is a tag file?
What is contextpath?
How can multiple submits due to refresh button clicks be prevented?
What is jsp and its uses?
What is jsp page?
What is meant by implicit objects and what are they?
Is jsp server side scripting language?
What is iselignored in jsp?
Can we use javascript with jsp pages?
What is a scriptlet in jsp and what is its syntax?
What are context initialization parameters?
List the different scope values for the
What are the attributes on page directives?
What is the use of jsp and servlet?
How to restrict page errors display in a JSP page?