top.doudou.common.tool.utils.web.ForwardUtils Maven / Gradle / Ivy
package top.doudou.common.tool.utils.web;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
/**
* @Description 转发工具类
* @Author 傻男人 <[email protected]>
* @Date 2020-10-13 14:06
* @Version V1.0
*/
public class ForwardUtils {
/**
*
* @param request
* @param response
* @param url 需要跳转的url
* @throws ServletException
* @throws IOException
*/
public void forward(ServletRequest request, ServletResponse response,String url) throws ServletException, IOException {
request.getRequestDispatcher(url).forward(request, response);
}
}