Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing values between jsp pages

 
bishal chhetri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have 2 jsp page bill.jsp and coll.jsp ;
there is 2 button in bill.jsp when first is clicked controll is passed to coll.jsp where only pure java code is written to insert data to db,
and when 2nd button is clicked coll.jsp have to extract data from db, which i have done by:

Connection conn=null;
Statement stat=null;
ResultSet rs=null;
stat=conn.creatstatement();
String retrivingqry="SELECT * FROM Menu1";
rs=stat.executeQuery(retrivingqry);

now i want to pass this rs back to bill.jsp to manipulate this data and show in tabular form;


so please can anybody help me to send this rs using pure java code in coll.jsp to send to bill.jsp,

and recive this data in bill.jsp (note: no need pure java code in bill.jsp)

please help me i am in hurry,
thanks for your response
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bish chh wrote:please help me i am in hurry,

Please EaseUp.

You need to check out how attributes work. You can't use the page scope, so you should focus on request scope or session scope.
 
bishal chhetri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:
bish chh wrote:please help me i am in hurry,

Please EaseUp.

You need to check out how attributes work. You can't use the page scope, so you should focus on request scope or session scope.



thanks for response, but please can you teach me by showing example of my problem
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bishal chhetri wrote:
Rob Spoor wrote:
bish chh wrote:please help me i am in hurry,

Please EaseUp.

You need to check out how attributes work. You can't use the page scope, so you should focus on request scope or session scope.



thanks for response, but please can you teach me by showing example of my problem

jsp attributes example. Shouldn't be too hard to find a few examples.
 
bishal chhetri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:
bishal chhetri wrote:
Rob Spoor wrote:
bish chh wrote:please help me i am in hurry,

Please EaseUp.

You need to check out how attributes work. You can't use the page scope, so you should focus on request scope or session scope.



thanks for response, but please can you teach me by showing example of my problem

jsp attributes example. Shouldn't be too hard to find a few examples.




no examples found in google for my problems so i have posted hear;
please any one help me
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you haven't found anything you're not looking hard enough. There are thousands, if not millions, of examples on how to use session and request attributes.
 
Amit Goda
Ranch Hand
Posts: 37
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i would suggest use some common ground for passing data such as JSON.

Store your Db data into jsonArray and send that array to the browser. The data which browser receives it is in the form javascript array so you can use javascript to obtain the data you require.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic