File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get table values from jsp to servlet

 
gayatri umesh
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//employeeMaintenance.jsp


This is my jsp which displays a table of values... Here, i choose one of the rows by selecting the radio button and click Update.. the control transfers to the servlet... I want to get the values of the fields displayed in the table in the jsp page(select, employeeID,first name, last name, phone number, auth level) in the servlet and display them in text boxes in another jsp page(editEmployee.jsp)...

//editEmployee.jsp


Kindly tell me a solution how to get the table values in the servlet.........
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gayatri umesh wrote:I want to get the values of the fields displayed in the table in the jsp page(select, employeeID,first name, last name, phone number, auth level)

No you don't. What you really want is the primary key of the record do that you can get those fields from the database. You don't need to needless fetch them from the client.

For that, simply make the primary key the value of the radio button.
 
gayatri umesh
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value for that radio button should be the employee ID?
 
gayatri umesh
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In employeeMaintenance.jsp, i gave


In servlet i gave,


Here when i print the value of obj, i get the value of employeeID of first record always...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gayatri umesh wrote:The value for that radio button should be the employee ID?


Yes. Otherwise, how can you hook up the data to the right record?
 
gayatri umesh
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.... i will try this..thanks....
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic