File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes get table values from jsp to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "get table values from jsp to servlet" Watch "get table values from jsp to servlet" New topic
Author

get table values from jsp to servlet

gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
//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

Joined: Jan 10, 2002
Posts: 61218
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
The value for that radio button should be the employee ID?
gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

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

Joined: Aug 26, 2009
Posts: 17
ok.... i will try this..thanks....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get table values from jsp to servlet