jsp-tutorialsmade

JSP Program to convert Fahrenheit to Celsius

This post teaches you how to write a program to find Celsius from Fahrenheit using JSP web application. You already know JSP is a web application which is slightly different from the traditional Java programming.

In this program I have not used JSP and Servlet but only JSP code embedded in the HTML page, basically Single page web application.

Let’s write JSP code to convert Fahrenheit to Celsius:

The above JSP script gets the value from Text box named as “fahrenheit” and then converts into Celsius by using the below formula:

celsius = (fahrenheit – 32) * 5/9;

Here is the entire JSP code embedded with HTML:

 

 

Related Posts

Leave a Reply