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
Differentiate between
What do you know about jsp expression language (jsp expression language – el)?
What is meant by jsp?
How can I use jsp in the mvc model?
Why should we not configure jsp standard tags in web.xml?
What is translation phase?
How can I maintain session in JSP Page in the bases of user name and password:
How can html output be prevented from being cached?
What is use of scriptlet tags in jsp?
Give the use of session object.
What is scriptlet tag?
List down the major differences between the jsp custom tags and java beans.
What is context in jsp?
How do I open a jsp file?
Why jsp is used in java?