0

I am building an application in Spring Boot and Thymeleaf that is already built in JSF (Java Server Faces). I have a part of the app in JSF that takes a values from the header. This is the code:

operator = FacesContext.getCurrentInstance().getExternalContext()
        .getRequestHeaderMap().get("user");

I would like to do the same in Spring Boot. I have already tried with @RequestHeader("user") in the Controller but I get an error saying that it cannot find this header values. Can someone translate the code from JSF to Spring Boot code or something in Java that will work ? Thanks

JohnNewman
  • 29
  • 1
  • 10
  • you mean https://stackoverflow.com/questions/60103748/get-request-header-in-spring-boot ? – Suraj Rao Apr 27 '22 at 10:30
  • These are two different frameworks.. you really ought to learn the framework you are going to use rather than 'translate' line by line... – Suraj Rao Apr 27 '22 at 10:32

0 Answers0