This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can we send data from one jsp page to another jsp page  RSS feed

 
vinaykrothapalli kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
friends good day for you
i have a small question i want to send the data from one jsp to another jsp so please send me the example for this
thanks
vinay


--------------
vinay
 
Ton Fever
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think it should like sending data to another form in html.
submit on your form.
 
Anu satya
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vinay,

You can use html tags like:
-----------------------------------------------------------
<form method="post" action="nextpage.jsp" name="inputpage">
<input type=text name="sample">
<INPUT TYPE="submit" Value="Submit" NAME="submit" title="Click to submit">
-----------------------------------------------------------
above in your first jsp page.
As soon as you click submit button, control as well as data-entered by the user in the textbox will go to next page as you mentioned in <form> tag.

To catch the values received from previous page, you can use JSP code in your second jsp page like:
-----------------------------------------
<%
String data=request.getParameter("sample");
out.println(data);
%>
-----------------------------------------
Here, the data stored in a textbox by name sample will be copied to string "data".
If you want to see whether the page received correct data or not,
you can use out.println statement.
 
Umesh Wale
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To send the data from one JSP to other you use URL Rewriting or Hidden elements defination or cookies or Sessions these all are the Session Management techniques.
if you want it in details let me know I will s in more detail
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!