post方式でリダイレクトまたは転送する


reponse.sendRedirectはget方式で提出します.もしpostがほしいなら、下を見てください.
public static void redirect(String url, Map,String> params, HttpServletResponse response) throws IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("/span>\"-//W3C//DTD HTML 4.01 Transitional//EN\">");
    out.println("");
    out.println(" sender");
    out.println(" ");
    out.println("
\"submitForm\" action=\""+url+"\" method=\"post\">"); Iterator it=params.keySet().iterator(); while(it.hasNext()){ String key=it.next(); out.println("\"hidden\" name=\""+key+"\" value=\""+params.get(key)+"\"/>"); } out.println(""); out.println("window.document.submitForm.submit();"); out.println(" "); out.println(""); out.flush(); out.close(); }