一个小问题,根据老师的课程的代码,使用forward重定向后,为啥url还是带上了
smartuploadservlet
request.setAttribute("result", result);
request.getRequestDispatcher("/index.jsp").forward(request, response);
web.xml
<servlet>
<servlet-name>SmartUploadServlet</servlet-name>
<servlet-class>com.hb.servlet.SmartUploadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SmartUploadServlet</servlet-name>
<url-pattern>/SmartUploadServlet.do</url-pattern>
</servlet-mapping>
不知道为啥每次文件上传成功后url都变为http://localhost:8080/HCQ_smartUpload/SmartUploadServlet.do