jsp forward vs include (static and dynamic)

forward include
Used to hand off the request and response to another JSP or servlet Java servlet temporarily hands the request and response off to the specified JSP.
Control will never return to the current JSP. Control will then return to the current JSP, once the other JSP has finished.
Attributes supported is page. Attributes supported are page / flush.
<jsp:forward page="url" /> <jsp:include page="script.jsp">

Filters

Filters can intercept the request and also control the response all without modify the servlet or JSP, which means that filters can be used without touching the servlets code, filters can be a very powerful tool.
    The are following things that you can do with filters:-
  • Performing security checks (request).
  • Reformat request headers or bodies(request).
  • Audit or log requests(request).
  • Compress the response (response stream ).
  • Append the response(response stream)
  • Create a different response(response)