来自Java 文档参考:
1.Forvoid forward(ServletRequest request,ServletResponse response)
request - a ServletRequest object that represents the request the client makes of the servlet
response - a ServletResponse object that represents the response the servlet returns to the client
2.对于void include(ServletRequest request,ServletResponse response)
request - a ServletRequest object that contains the client's request
response - a ServletResponse object that contains the servlet's response
因此,在这两种情况下,response
都是用于将您的 servlet 响应写入或发送给客户端的对象。
response
是从调用 servlet 传递给调用者 servlet 以进行进一步处理的对象。
请参阅此链接什么是请求调度程序,它可以帮助您了解它是如何工作的。