when we have to write the DataBase connectivity in Jsp Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    #1

    when we have to write the DataBase connectivity in Jsp Page

    hi!
    lost month i was attend one interview,,,
    they asked me questions like :what Scenario we are using Database connection in jsp .
    but i don't know the answer..
    can you tell me the answer?...
    Thanks
    Kaleeswaran
  • ajos
    Contributor
    • Aug 2007
    • 283

    #2
    Originally posted by kaleeswaran
    hi!
    lost month i was attend one interview,,,
    they asked me questions like :what Scenario we are using Database connection in jsp .
    but i don't know the answer..
    can you tell me the answer?...
    Thanks
    Kaleeswaran
    IMHO, we should never use database connection in jsp page if possible. It should ideally be in a servlet/class. Its about best practises, as for your question, i've never used a db connection in my jsp page(and i intend to keep it that way).

    regards.

    Comment

    • articles
      New Member
      • Mar 2007
      • 5

      #3
      Whenever you want to retrieve the data from the database and make your site dynamic ..HFor ex.. you are making an application which books ticket online.. then you have to use the database

      Comment

      Working...