In web applications, programmer has to send textbox data to another page and receive this data on a page to do some operations like display, save, insert in database or do any arithmetic or logical operation on this data.
Now here we will see how we send/receive data in between JSP pages by an example.
page1.jsp
<form id="" name="" method="post" action="page2.jsp">
<input name="text" type="text"/>
<input type="submit" name="Submit" value="Send" />
</form>
page2.jsp
<%
String s=request.getParameter("text");
out.println(s);
%>
Now here we will see how we send/receive data in between JSP pages by an example.
page1.jsp
<form id="" name="" method="post" action="page2.jsp">
<input name="text" type="text"/>
<input type="submit" name="Submit" value="Send" />
</form>
page2.jsp
<%
String s=request.getParameter("text");
out.println(s);
%>