Skip to content

sivasaianjur1412/springmvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spring MVC

BMI Calculator

Intuition and implementation

  • Implement a BMIController in a Spring MVC project to process POST requests at /user/bmi.
  • The controller will accept height in inches and weight in pounds from the request.
  • It will calculate BMI using the formula: BMI = (weight in pounds / (height in inches)^2) * 703.
  • The input JSP page will provide a form for users to enter their height and weight.
  • Upon form submission, data is sent to /user/bmi via POST.
  • The controller processes this data, calculates BMI, and prepares the result.
  • Using HttpSession for maintaining the session for a user.

Results

image

BMI Calculator using REST controller

Intuition and Implementation

  • For creating a RESTful service to calculate BMI, we'll develop a Spring Boot application that includes a BMIRestController.
  • This controller will handle POST requests to the /bmirest endpoint.
  • Users will send their height and weight as parameters in the request body.

Testing Results

postManSnap

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages