现在的问题是这样的,
有个1.jsp向2.jsp提交数据.然后2.jsp判断之后,转向一个servlet
我这么写
response.sendRedirect("/dvr/aa.servlet?par1=.........");出错.有谁知道改如何向servlet提交?

解决方案 »

  1.   

    一个笨但是很有效的办法:<form id="go" action="xxxServlet">
      <input type="hidden" name="aa" />
      <input type="hidden" name="bb" />
    </form>
    <script>
    document.getElementById("go").submit();
    </script>
      

  2.   

    <form id="go" action="xxxServlet?par1...&par2...">
    </form>
    <script>
    document.getElementById("go").submit();
    </script>
      

  3.   

    要看是什么错误,如果是没找到类,则是SERVLET路径有问题.
      

  4.   

    我一般都是把2.jsp放到iframe中
      

  5.   

    使用标签
    <jsp:forward page="/servlet/login"> <jsp:param name="username" value="jsmith" /> </jsp:forward>.