Changeset b00d81b for Prototype Application/Paw5/src/main
- Timestamp:
- 03/03/23 22:20:43 (20 months ago)
- Branches:
- main
- Children:
- 3e59177
- Parents:
- d7eaf88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/HomeController.java
rd7eaf88 rb00d81b 1 1 package finki.paw5.web.controllers; 2 2 3 import jakarta.servlet.http.HttpServletRequest; 3 4 import org.springframework.stereotype.Controller; 4 5 import org.springframework.web.bind.annotation.GetMapping; … … 10 11 11 12 @GetMapping 12 public String getHomePage(){ 13 public String getHomePage(HttpServletRequest request) { 14 if(request.getSession().getAttribute("user")==null){ 15 return "redirect:/login"; 16 } 13 17 return "home"; 14 18 } 19 15 20 @GetMapping("/aboutUs") 16 public String getSuccessPage() {21 public String getSuccessPage() { 17 22 return "/aboutUs"; 18 23 }
Note:
See TracChangeset
for help on using the changeset viewer.