
Using JSP language, create a system that calculates Body Mass Index (BMI) of users who entered their weight and height. Then, system will display all the records. Can you provide me the coding ?

Here is a jsp code that accepts the height and weight of the user and find the BMI.
1)bmiForm.jsp:
<html>
<form name="form" method="post" action="bmp.jsp">
<pre>
Enter Weight: <input type="text" name="weight">
Enter Height: <input type="text" name="height">
<input type="submit" value="Find BMI">
</pre>
</form>
</html>
2)bmi.jsp:
<%
String wt=request.getParameter("weight");
String ht=request.getParameter("height");
int weight=Integer.parseInt(wt);
int height=Integer.parseInt(ht);
int w=weight*703;
int h=height*height;
int bmi = w/h;
out.println("BMI of weight "+weight+" and height "+height+" is: "+bmi);
%>