Difference between include and forward mechanism for request dispatching concept?

后端 未结 4 878
执笔经年
执笔经年 2020-12-02 07:43

Forward() : This can be done in two ways by Request & ServeletContext. Forwarding a request from a servlet to another resource (servlet, JSP file, or HTML file) on th

4条回答
  •  广开言路
    2020-12-02 08:22

    The main difference is that when you use forward the control is transferred to the next servlet/jsp you are calling, while include retains the control with the current servlet, it just includes the processing done by the calling servlet/jsp(like doing any out.println or other processing).

提交回复
热议问题