Last change
on this file was 0e4d807, checked in by Ivona <ivonatapshanovska@…>, 13 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
522 bytes
|
Rev | Line | |
---|
[0e4d807] | 1 | package com.example.baziproekt.web;
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | import org.springframework.stereotype.Controller;
|
---|
| 5 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
| 6 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
| 7 |
|
---|
| 8 | import javax.servlet.http.HttpServletRequest;
|
---|
| 9 |
|
---|
| 10 | @Controller
|
---|
| 11 | @RequestMapping({"/","/home"})
|
---|
| 12 | public class HomeController {
|
---|
| 13 |
|
---|
| 14 | @GetMapping
|
---|
| 15 | public String getHomePage(HttpServletRequest request)
|
---|
| 16 | {
|
---|
| 17 | request.getSession().setAttribute("korisnik",request.getRemoteUser());
|
---|
| 18 | return "home";
|
---|
| 19 | }
|
---|
| 20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.