Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Quote:

i have 2 html pages.retrieve data from both and display on other servlet page.And i having a button redirecting to first html and re-entering the data again .second given data will be show below first given data , automatically in servlet page


How it can be possible

i tried with session object.
how to store and retrieve the data using loop from session object

output required:
1.entry
name: ---
email:---- ---->first time stored data
mobno:---

2.entry
name:---
email:--- ------>second time stored data
mobno:---


loopping................

What I have tried:

String name=(String)session.getAttribute("n");
		String email=(String)session.getAttribute("e");
		String mobno=(String)session.getAttribute("m");
		//	out.println("<body><h1>"+count+" :Entry</h1>");
			out.println("<h3>Name:"+name+"</h3>");
			out.println("<h3>Email:"+email+"</h3>");
			out.println("<h3>Mobno:"+mobno+"</h3>");
		//	count++;
			out.println("<a href=First.html>Go Home</a>")
Posted
Updated 2-Jun-17 2:44am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900