把哪个form的action属性设为空就可以了:
<form method="post" action="">
....
....
</form>

解决方案 »

  1.   

    再form的action中写上提交的事自己页面的名字!
    如:页面较my.jsp
    <form action="my.jsp">
      

  2.   

    那么我在自己的jsp页面上应该如何接受发来的数据呢?
    直接用request.getAttribute();为什么得不到值呢〉
      

  3.   

    给你另外一种思路,在网页放一个iframe,然后将form的target指定到该页的这个iframe的名字,这样就可以本页提交本页显示
      

  4.   

    假设本页面命名为:Myjsp.jsp
    在<form>表单中把action的值设置为本页,
    例如:<form name=myform action="Myjsp.jsp" method="post">
    你可以在本页中获取它的值:request.getParameter("");你说的那个Method不是那样用的,它是在request设置一个值后才可以用它来获取的;
    如:request.setAttribute();有这个Method后,才可以它的
      

  5.   

    <%@page contentType="text/html; charset=gb2312"%>
    <% String req_submit=request.getParameter("Submit"); 
       
       if(req_submit!=null)   //Form is submit
       {
          String  req_username = new String(request.getParameter("username").getBytes("ISO8859_1"),"GBK");  //接收中文
          out.print("<Br>  提交的用户名是:"+req_username );
       }
       else    //display the form 
       {
    %>
    <FORM name=mainForm action="" method="post" >
           用户名:<INPUT size=30 name=username>
             <input type="submit" name="Submit" value="提交">
    </Form><%
       }
    %>