We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1749495 commit 254f58eCopy full SHA for 254f58e
jdk_21_maven/cs/web/triangle-ssr/src/main/java/com/example/springmvcdocker/FormController.java
@@ -17,11 +17,11 @@ public String showForm() {
17
18
@PostMapping("/process")
19
public String processForm(
20
- @RequestParam("a") int a,
21
- @RequestParam("b") int b,
22
- @RequestParam("c") int c)
+ @RequestParam("a") String a,
+ @RequestParam("b") String b,
+ @RequestParam("c") String c)
23
{
24
- int value = TriangleClassification.classify(a, b, c);
+ int value = TriangleClassification.classify(Integer.parseInt(a), Integer.parseInt(b), Integer.parseInt(c));
25
String triangleType = getTriangleType(value);
26
return "redirect:/" + triangleType.toLowerCase().replace(" ", "-");
27
}
0 commit comments