Monday, 2 January 2017

Send/receive Textbox value on one to another page in JSP

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);
%>

No comments:

Post a Comment

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...