We will now discuss how to develop a sample interest calculator application by using the Application Deployment tool of JWSDP. This will help you understand the procedure for creating an application by using the tool; therefore, it will be useful when you create the actual application for your project.
The interest calculator application calculates the interest payable on a specified amount for a specified period and rate of interest. The application consists of two files as listed:
The Interest_calc.htm file displays a form to the user. In this form, the user enters the following information into the appropriate text boxes:
When the user submits the form after providing the values, the values are passed to a JSP page, which calculates and displays the result to the user. The code for the Interest_calc.htm is as follows:
The Interest_calc.jsp file accesses the values that the user enters into the HTML page. The JSP page performs calculation on these values and displays the calculated interest to the user.
The code for the Interest_calc.jsp file is as follows:
Deploying the Interest Calculator Application
Now that you have created the files for the Interest Calculator application, you need to deploy the application. You can use the Application Deployment tool of the JWSDP to deploy the application. To deploy the interest calculator application, you need to perform the following steps:
The Application Deployment Tool of the JWSDP
The WAR File Page of the Wizard
The Dialog Box to Specify the WAR File
The Edit Contents of Int_calculator Dialog Box
The Dialog Box Used to Specify the Content of the WAR Files
The Contents Box
The Choose Component Type Page
The Component General Properties Page
The Review Settings Dialog Box
The Application Deployment Tool with the WAR File
The Text Input Dialog Dialog Box
Running the Interest Calculator Application
You have now deployed the interest calculator application. The application is ready to be executed. To run the interest calculator application, type the following command in the address bar of the Web browser:http://localhost:8080/Int_calculator/Interest_calc.htm
The interest calculator is displayed. You need to enter a principal amount, interest rate, and period values, as displayed in Figure.
The Form for Entering the Values
When you click the Submit button, the values are passed to the JSP page, Interest_calc.jsp, which calculates and displays the result, shown in Figure.
The Calculated Interest
XML Related Interview Questions
|Soap Tool Interview Questions||HTML Interview Questions|
|PHP Interview Questions||ASP.NET Interview Questions|
|PHP5 Interview Questions||Java Interview Questions|
|CSS Interview Questions||XSLT Interview Questions|
|Java XML Interview Questions||XMLHttpRequest (XHR) Interview Questions|
|ebXML Interview Questions||XML DOM Interview Questions|
|XML-RPC Interview Questions||XSD Interview Questions|
|Soap Web Services Interview Questions||XSL Interview Questions|
|Xml Publisher Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.