私はフォームを持つjspページ(たとえば、source.jsp
)を持っています:
<html>
<head>
<body>
<form action="Servlet123" method="POST">
// form fileds ...
</form>
</body>
</head>
</html>
そして、doPost
サーブレットで必要なもの -
@WebServlet("/Servlet123")
public class Servlet123 extends HttpServlet {
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
//use with requset...
}
}
source.jsp
このサーブレットにリクエストを送信するページ (この場合は - ) を取得するにはどうすればよいですか? リクエスト/セッションにメソッドはありますか?