У меня есть 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
)отправка запроса этому сервлету? Есть ли метод в запросе/сеансе?