This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculation in jsp table for each row

 
biswajit kr das
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table in jsp which have 3 columns- num1, num2, sum



I want to display the sum automatically for each of the row. Above code works only for the first row, but not for the other rows. I am not sure how to achieve that. Thanks in advance
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
You have hard coded the names of the fields in the function. You need a way to tell which row you are on and which fields you are using. Any ideas?
I'm going to move this to the javascript forum since this isn't really a Struts problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic