MODLOGIN AVISO PASS CADUCADA INTENTOS

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> request.getCookies()  [in template "3545192#3545333#191461198" at line 14, column 12]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #list request.getCookies() as cookie  [in template "3545192#3545333#191461198" at line 14, column 5]
----
1<#-- 🚀 DESACTIVAR CACHÉ DE LIFERAY PARA ESTA PLANTILLA -->  
2<#assign IsCacheable = false />  
3<#if renderRequest??>  
4    <#-- Forzamos que el scope del portlet que renderiza no guarde caché --> 
5    ${renderRequest.setAttribute("javax.portlet.cache.scope", "PRIVATE")}  
6    ${renderRequest.setAttribute("javax.portlet.cache.time", "0")}  
7</#if>  
8 
9<#-- 1. Lógica en SERVIDOR: FreeMarker busca la cookie HTTP -->  
10<#assign intentosRestantes = "0" />  
11<#assign mostrarAviso = "false" />  
12 
13<#if request?? && request.getCookies??>  
14    <#list request.getCookies() as cookie>  
15        <#if cookie.getName() == "GVA_INTENTOS_RESTANTES">  
16            <#assign intentosRestantes = cookie.getValue() />  
17            <#assign mostrarAviso = "true" />  
18        </#if>  
19    </#list>  
20</#if>  
21 
22<#-- 2. Si FreeMarker detectó la cookie, pintamos el banner -->   
23<#if mostrarAviso == "true">  
24    <div id="banner-aviso-caducidad" class="alert alert-warning alert-fade show mt-3">   
25        <div class="error-content">   
26            <i class="fa-solid fa-circle-exclamation mr-2"></i>   
27            <span id="mensaje-texto-aviso">  
28                <@liferay.language_format arguments=[intentosRestantes] key="csmodlogin.ldap.password.caducada.quedan.x.intentos" />  
29            </span>   
30        </div>   
31    </div>   
32</#if> 
33 
34<#--  CONTROL DE USUARIO YA LOGUEADO EN FREEMARKER --> 
35<#if themeDisplay?? && themeDisplay.isSignedIn()> 
36    <div class="alert alert-info alert-fade show mt-3"> 
37        <div> 
38            <i class="fa-solid fa-circle-user mr-2"></i> 
39            <span> 
40                <#--  
41                  Recuperamos el nombre completo usando el objeto 'user' que Liferay da por defecto. 
42                  Pasamos el parámetro en una lista [user.getFullName()] como requiere language_format. 
43                --> 
44                <@liferay.language_format  
45                    arguments=[user.getFullName()]  
46                    key="csmodlogin.esta.conectado.como"  
47										 
48                /> 
49            </span> 
50        </div> 
51    </div> 
52</#if>