• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing displayed data from JSP page to the database  RSS feed

 
Ummu Hanisah
Greenhorn
Posts: 10
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to create a room reservation system where the users need to complete a form according to their room preferences
and the system will display the result of the available rooms. (I already settled this part)

For each row of the displayed result there will be a button to reserve the selected room. I don't have any idea how to pass the room's details displayed
on the result when the user click the reserve button. I'm not sure if this even possible. Is there another way to reserve the room by click the reserve button?

I'm using JSP technology and Oracle database.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does each row not have a primary key?
 
Ummu Hanisah
Greenhorn
Posts: 10
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has a primary key.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then that's how you'd identify the specific row. Associate the primary key with the reserve button for each room.

(And before you ask how, I'm going to let you come up with a few approaches on your own.)
 
Ummu Hanisah
Greenhorn
Posts: 10
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault for the hint.

I use requestParameter and put it as a link for each reserve button. By passing the reservationid which is a primary key, the room can now be book.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!