What is the difference betweeen a statis and dynamic include?

Showing Answers 1 - 3 of 3 Answers

vijay Jaiswal

  • Sep 7th, 2005
 

Static incude means files are included at compile time.After inclusion if there is change in source file it will not reflect that jsp. 
Dynamic include means files are included at run time. 
If there is any change in source file it will reflected in Jsp

  Was this answer useful?  Yes

mannu

  • Nov 3rd, 2005
 

static means server will not execute that part and send it to client as it is while dynamic contect will be executed by server and then its resultant will send to client

  Was this answer useful?  Yes

the two types of include are page include and jsp include. If u use page include, only one servlet will be generated(code of the included jsp will be merged with the first jsp) by the JSP Compiler. If we use jsp include two servlets will be generated and requestdispatcher will be used in the first servlet to include the second servlet.

If we make any changes in any of the JSPs, and if we use jsp include only that jsp which has been changed will be compiled by the JSP Compiler.The other JSP will not be re-compiled. And if we use page include JSP Compiler generates the servlet irrespective of the jsp to which the change has been made.(This is the scenario on Tomcat 5 .)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions