<html>
<head>
<title>Reading data by Using GET method</title>
</head>
<body>
<h1>GET method</h1>
<ul>
<li><p><b>Name:</b>
<%= request.getParameter("name")%>
</p></li>
<li><p><b>City:</b>
<%= request.getParameter("city")%>
</p></li>
<li><p><b>Profession:</b>
<%= request.getParameter("prof")%>
</p></li>
</ul>
</body>
</html>
//welcome.html
<html>
<head>
<title>Using POST method</title>
</head>
<body>
<h2>Using POST method</h2>
<form action = "welcome.jsp" method = "POST">
Name: <input type = "text" name = "name"/>
City: <input type = "text" name = "city"/>
Job: <input type = "text" name = "job">
<input type = "submit" value = "Submit">
</form>
</body>
</html>
//welcome.jsp
<html>
<head>
<title>JSP page using POST method</title>
</head>
<body>
Name: <%= request.getParameter ("name") %>
City: <%= request.getParameter ("city") %>
Job: <%= request.getParameter ("job") %>
</body>
</html>