1

I am trying to write some code in jsf scriptlet to get a attribute from HttpSession and compare with a UI value (to display a pop-up when both session and UI values are same ) .

  • Maybe this can help: HttpSession session = request.getSession(true). String username = (String)session.getAttribute("username"); – Gabriel Mesquita Sep 06 '17 at 13:43
  • I have done the same in java class but I need to write the above code in jsf scriptlet - to compare it with a UI value on AJAX call – user8558972 Sep 06 '17 at 13:47

1 Answers1

0

You can do it in JSF with EL: #{session.getAttribute('key') eq uiValue}.

List of all JSF EL objects can be found here.

OneOfMany
  • 86
  • 4