Sunday, 12 February 2017

wt calculator program using servlets

CALCULATOR PROGRAM
AIM: To implement calculator operations using servlets and access the results stored in database

The below image shows the directory structure to be followed in tomcat server




After compiling java programs place class files in classes folder


To use database we require mysqlconnector.jar file which should be placed in lib folder.


Below is the deployment descriptor which gives the details about servlet,servlet class,url-pattern 



All the source code file are kept in src folder.


This is the main page where we are creating frames and accessing servlets in it.


The File which gives the details about left frame.

Calculator html file.Notice the target attribute here.

The file for another frame where results are showed.

This is the calculator servlet.


Calculator HTML file.

Calculator results page.


Calculator db servlet.



Tomcat Manager page.U can see the deployed calc project.


Calculator index page running on tomcat server.




Calculator table in Database.

No comments:

Post a Comment