我可以在html表单中有两个动作servlet吗?

时间:2013-04-06 07:58:13

标签: servlets

<form action="LoginServlet" method="post">
            Username: <input type="text" name="username">
            Password: <input type="password" name="password">
            <input type="submit" value="Login">
        </form>

我还需要在'ChangePasswordServlet'中检索'username'参数。 请帮我格式化。我试过搜索它但没有找到任何解决方案。

1 个答案:

答案 0 :(得分:0)

添加第二个按钮以更改密码:

<input type="submit" value="Change Password" formaction="ChangePasswordServlet">