Discussions

Web tier: servlets, JSP, Web frameworks: servlet handling different 3-4 html forms

  1. servlet handling different 3-4 html forms (1 messages)

    Can a single servlet handle say 3-4 html forms having different no. parameters and update the data in different tables say table1, table2 and table 3 in the same database
    depending upon the parameters?
  2. Yes a servlet can handle this try this .
    1.Pass a parameter in the url to differentiate which form is wanted.

    2. Include a hidden variable in HTML to differentiate which database to update.

    The first step logic is written in doGet() method.
    The Second step is in doPost().

    Hope this helps.