我用的是eclipes3.2,怎么才能写一个修改密码的Action阿 

解决方案 »

  1.   

    用FORM把新参数传到后台
    用UPDATE语句更新就可以了
      

  2.   

    在我用的Eclipes3.2里面没有像Action一样单独的写个Form,根本没有,我用的是公司的框架,我正愁呢,也不知道怎么写呢
      

  3.   

    只要页面有form,不建单独的form也行,在action里用request.getParameter()得到参数,在进行验证也可以的
      

  4.   

    页面
    <form action="AA.do">
    <input type="text" name="pwd">
    <input type="text" name="name">
    <input type="submit" name=提交 value="提交">
    </form>你的AAaction
    得到页面参数新密码
    String name= request.getParameter("name");
    String new = request.getParameter("pwd");
    连接你的数据库update wokao set userid = 80 where userName = 11
    String sql = "update 表名 set mima(你的数据库字段) ='"+new+"' " where name="'+name+'";
      

  5.   

    行 虽说你的我没有全看懂,Form的部分看懂了 但是Action还没有看懂,给分了