本帖最后由 小石姐姐 于 2017-11-29 16:34 编辑
http://localhost:8080/day10/AServlet
前提:所有路径必须以"/"开头
把能填的路径分为两种情况
客户端路径 => 路径使用来给客户端看的 => "/"=> 主机路径http://localhost:8080/
<form action="/day10/AServlet" >
<a href="/day10/AServlet" >
response.sendRedirect("/day10/AServlet");
<meta http-equiv="refresh" content="3;url='/day10/AServlet'">
服务器端路径 => 路径使用来给服务器看的=> "/"=> 项目路径 http://localhost:8080/day10/
request.getRequestDispatcher("/AServlet"); |
|