$save$ のような 3 つのボタンが必要な jsp ページを作成して、実行したプロセスを保存し、削除し、実行した内容を表示したいと考えています。
i tried as :
<form action="go_save" method="post"> // how to go_view.jsp, go_delete.jsp
<input type="submit" name="submit" value="SUBMIT">
code :
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<form action="go.jsp" method="post" >
name<input type="text" name="name">
age<input type="text" name="age">
<input type="button" value="Save" name="Save"
onclick="document.forms[0].action = 'go_save.jsp'; return true;" />
<input type="button" value="view" name="view"
onclick="document.forms[0].action = 'go_view.jsp'; return true;" />
</form>
</body>
</html>
しかし、ここでは、ページが go_view、go_save などの特定のページにリダイレクトされていません。これらの値の name 、 age を go_view 、 go_save でキャッチしたい。しかし、どのように?