Mam mojego Servlet'a
@WebServlet(name = "FetchServlet")
public class FetchServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setAttribute("id","asddas");
request.setAttribute("data","asddas");
request.setAttribute("primes","asddas");
}
mam moja klase JSP
<%@ page language="java" contentType="text/html; ISO-8859-1" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Hello servlet</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="post">
Id: ${id}
Data: ${data}
Primes: ${primes}
<input type="submit" value="Fetch">
</form>
</body>
</html>
a to jest mój web.xml
<servlet>
<servlet-name>fetch</servlet-name>
<servlet-class>FetchServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fetch</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
bardzo proszę o pomoc- jak ja mam ustawić w servletcie by na te 3 pola wstawial jakies 3 dane ?