Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

while click button,it will retun the correspond tabl name

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have 10 table also i have a servlet page which contain 10 table-rows.
each row have one table-content and one edit button..
if i click edit button,it will return the correspond table name.
how i do this???
please reply me..

thank you..
 
Sheriff
Posts: 6871
1312
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch,

I'm not understanding your requirement exactly. However, in general,...

  • Associate an identifier for each button while populating them. If you are using hyperlinked button, assign that id to the url as a parameter
  • Use a servlet for handling the request, track the id, and use another business component for the database interaction.
  • Using that business component, findout the table name for that id.
  • Assign that table name to a request attribute, and dispatch the request to a JSP.
  • Print that attribute value from the JSP.


  • Ps - you can use ajax instead of generating new pages.
     
    Devaka Cooray
    Sheriff
    Posts: 6871
    1312
    IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    "mkabdul kadermk", please check your private messages regarding an important administrative matter.
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic