I have:
A managed bean called "LoginBean". 
A JSF page called "login.xhtml"

In this jsf page, i have a login form.

Inside the managebean i have a loginCheck function.

```
public void loginCheck(){
 if(logincorrect){
  //set user session 
 }else{
  //set lockout count session ++
 }
}

```

What i want to do in my jsf page is that when the lock out count session == 2 (means users failed to login correctly 2 times, i need a recaptcha tag to be displayed.

```
<td>
    <%
         if(FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("numberOfLogins") == 2){
         <p:captcha label="Captcha" requiredMessage="Oops, are you human?"/>
       }
     %>

```

Apparently, the <% tag does not work. Appreciate any help from java/jsf experts.