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 are the life-cycle methods for a jsp?
What are the literals used in jsp?
When i am useing useBean tag of JSP in weblogic server It show compiletion error..Like bad class file: C:\bea\user_projects\domains\Mahesh\applications\UseBean\WEB-INF\classes\user\UserData.class class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. user.UserData user1 = null; //[ /SaveName.jsp; Line: 4]
Give uses of object cloning?
What is the _jspservice() method?
Which language is used to write servlets and jsp?
How is jsp better than servlet technology?
What is jsp? Explain
What is the default value of session attribute in jsp?
What is the page directive is used to prevent a jsp page from automatically creating a session?
How many jsp implicit objects are there?
What is the purpose of jsp?
Which is better jsp or javascript?
How did you implement caching in jsp?
How does error handling occur with jstl?