请求路径的问题

请求路径的问题

明确路径谁使用

练习:

动态获取虚拟目录的方式

String contextPath = request.getContextPath();
response.sendDirect(contextPath + "资源B的路径");