I have jsp page (say, source.jsp
) with form:
<html>
<head>
<body>
<form action="Servlet123" method="POST">
// form fileds ...
</form>
</body>
</head>
</html>
And the required doPost
in servlet -
@WebServlet("/Servlet123")
public class Servlet123 extends HttpServlet {
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
//use with requset...
}
}
How can I get the page (in this case - source.jsp
) sending the request to this servlet? Is there a method in request/session?