Please help in Web design?

I am writing a web application and I am using the a servlet to do all for me, after analyzing I have divided my Application/code in these parts,

1)Connection with the database,

2)Reading the specific setting file upon the start of application.

3)Processing the different transactions in the database.

4)Closing all the connections to database upon exiting the application.

Please carefully analyze and tell which part of application should be coded in/put in which method (init(),destroy(),service()) of the servlet.

1 Answer

Relevance
  • 1 decade ago
    Favourite answer

    init() should have 1. and 2.

    service() 3.

    destroy() 4.

Still have questions? Get answers by asking now.