request.setAttribute("strsql",strsql);RequestDispatcher rd = getServletContext().getRequestDispatcher("/search/searchresult.jsp");
rd.forward(request, response);---------------------------response.sendRedirect("searchresult.jsp");
rd.forward(request, response);---------------------------response.sendRedirect("searchresult.jsp");
编码:<a href="<%=response.encodeURL("dir/page.jsp")%>">link</a>response.sendRedirect("dir/page.jsp")
编码:resposne.sendRedirect(response.encodeRedirectURl("dir/page.jsp"))(直接敲的,大小写可能有问题)
在html里面,相对于post方式来说,get方式也可以认为是url重写