• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 6832
1299
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: 6832
    1299
    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.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic