Header Ads

  • Breaking Now

    What is the difference between ' include file = ' and 'jsp:include page = ...'

    <@ include file = ...>: The content of included file is textually embedded in the page that has <@ include file=".."> directive.It occurs at compile time. If included file changes, the changed content will not be included in the output. This approach is used in template creations where code from one jsp file is included in multiple jsp files.
    <jsp:include page="..">: It is like a function call from one jsp to another jsp. The inclusion of one jsp content to another happens at execution time. This approach is handy for web application modularization.If included file changes then the new contents will be included in the output.

    2 comments:

    1. I would like to add more diffrence between @include and <jsp:include since the <jsp:include is executed at runtime it is faster compared to @include

      ReplyDelete
    2. Once the concerning JSPs are compiled the @include code would normally be faster since it is in-lined.

      ReplyDelete

    Post Top Ad

    Post Bottom Ad