<div dir="ltr">Hi guys,<div>Has any one faced any issue with tomcat 8 adapters.</div><div>For some reason i am not get keycloak login screen on my web app,Here is my scenario</div><div><br></div><div>1. Latest version of Keycloak runs on wildfly</div><div>2. A war runs on tomcat.I put all the jar files under tomcat/lib dir.Below is the keycloak.json and my web.xml file which goes under my WEB-INF</div><div>3. When i login , i directly gets my webapp page and it does not redirects me to keycloak login page.</div><div>4. My webapp is build using angularjs</div><div><br></div><div>keycloak.json</div><div>********************</div><div>







<p class="">{</p>
<p class="">  &quot;realm&quot;: &quot;SnrAppsRealm&quot;,</p>
<p class="">  &quot;realm-public-key&quot;: &quot;MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAutb9hlKhbZvIm6RDPPFFpR1RcNAt/NpzCWemJOveG1Ve5eu2AwPKwmqvkhTaMWUW990BFPIkBRPv13Grt9AVTMTgU10IeK/PM9CGN05eFr6S3KMSSTskpszIN3opiRQ5r8/eCYjC4Bk6qFkbtrlp6ORvUkLS7nMLwVLh9JDo2Fx9nWd+l1oLq1YpYMYeLDcaOAW/vdjYSfyLueu2wESjY9oSEs8x43ZyIhNKGRmW3oDXYL8X5guiqalZD5gbhWv6v3WpeTqdi0sLv4GI2B3oSG76Z/x2On/Sc2r3szfM8kUllyV7K8uYoMgD7DFVOZX5g6Bi6xntzkJHwLMJtW4UPwIDAQAB&quot;,</p>
<p class="">  &quot;<span class="">auth</span>-server-<span class="">url</span>&quot;: &quot;<a href="http://xxxxx.com:9322/auth">http://xxxxx.com:9322/auth</a>&quot;,</p>
<p class="">  &quot;<span class="">ssl</span>-required&quot;: &quot;none&quot;,</p>
<p class="">  &quot;resource&quot;: &quot;<span class="">snrapps</span>-web&quot;,</p>
<p class="">  &quot;credentials&quot;: {</p>
<p class="">    &quot;secret&quot;: &quot;dda19c87-<span class="">efee</span>-4c33-a1b3-8b64ad545s0f&quot;</p>
<p class="">  },</p>
<p class="">  &quot;use-resource-role-mappings&quot;: true</p>
<p class="">}</p><p class="">*****************************<br></p><p class="">web.xml<br></p><p class=""><span class="">&lt;</span><span class="">web-app</span><span class=""> </span><span class="">xmlns</span><span class="">=</span>&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>&quot;<span class=""> </span><span class="">xmlns:xsi</span><span class="">=</span>&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<span class=""> </span></p><p class=""><span class="">xsi:schemaLocation</span><span class="">=</span>&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>&quot;<span class=""> </span><span class="">version</span><span class="">=</span>&quot;3.0&quot;<span class="">&gt;</span></p><p class=""><span class="">       </span><span class="">&lt;</span>module-name<span class="">&gt;</span><span class="">snrapps</span><span class="">-web</span><span class="">&lt;/</span>module-name<span class="">&gt;</span></p><p class=""><br></p><p class=""><br></p><p class=""><span class="">    </span><span class="">&lt;</span>security-constraint<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>web-resource-collection<span class="">&gt;</span></p><p class=""><span class="">            </span><span class="">&lt;</span>web-resource-name<span class="">&gt;</span><span class="">/</span><span class="">snrapps</span><span class="">-web</span><span class="">&lt;/</span>web-resource-name<span class="">&gt;</span></p><p class=""><span class="">            </span><span class="">&lt;</span>url-pattern<span class="">&gt;</span><span class="">/*</span><span class="">&lt;/</span>url-pattern<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;/</span>web-resource-collection<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>auth-constraint<span class="">&gt;</span></p><p class=""><span class="">            </span><span class="">&lt;</span>role-name<span class="">&gt;</span><span class="">user</span><span class="">&lt;/</span>role-name<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;/</span>auth-constraint<span class="">&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;/</span>security-constraint<span class="">&gt;</span></p><p class=""><br></p><p class=""><span class="">    </span><span class="">&lt;</span>security-constraint<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>web-resource-collection<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span><span class="">url-pattern</span><span class="">&gt;</span><span class="">/*</span><span class="">&lt;/</span>url-pattern<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;/</span>web-resource-collection<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>user-data-constraint<span class="">&gt;</span></p><p class=""><span class="">            </span><span class="">&lt;</span>transport-guarantee<span class="">&gt;</span><span class="">CONFIDENTIAL</span><span class="">&lt;/</span>transport-guarantee<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;/</span>user-data-constraint<span class="">&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;/</span>security-constraint<span class="">&gt;</span></p><p class="">    &lt;login-<span class="">config</span>&gt;</p><p class="">        &lt;auth-method&gt;BASIC&lt;/auth-method&gt;</p><p class="">        &lt;realm-name&gt;this is ignored currently&lt;/realm-name&gt;</p><p class="">    &lt;/login-<span class="">config</span>&gt;</p><p class=""><span class="">    </span><span class="">&lt;</span>security-role<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>role-name<span class="">&gt;</span><span class="">admin</span><span class="">&lt;/</span>role-name<span class="">&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;/</span>security-role<span class="">&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;</span>security-role<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span>role-name<span class="">&gt;</span><span class="">user</span><span class="">&lt;/</span>role-name<span class="">&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;/</span>security-role<span class="">&gt;</span></p><p class="">










































</p><p class=""><span class="">&lt;/</span>web-app<span class="">&gt;</span></p><p class=""><br></p><p class="">***************</p><p class="">META-INF/context.xml</p><p class=""><br></p><p class=""><span class="">&lt;?</span><span class="">xml</span><span class=""> </span>version<span class="">=</span><span class="">&quot;1.0&quot;</span><span class=""> </span>encoding<span class="">=</span><span class="">&quot;UTF-8&quot;</span><span class="">?&gt;</span></p><p class=""><span class="">    </span><span class="">&lt;</span><span class="">Context</span><span class=""> </span><span class="">path</span><span class="">=</span>&quot;/snrapps-web&quot;<span class="">&gt;</span></p><p class=""><span class="">        </span><span class="">&lt;</span><span class="">Valve</span><span class=""> </span><span class="">className</span><span class="">=</span>&quot;org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve&quot;<span class=""> </span><span class="">/&gt;</span></p><p class="">










</p><p class=""><span class="">    </span><span class="">&lt;/</span>Context<span class="">&gt;</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">***********</span></p><p class=""><span class=""><br></span></p><p class=""><br></p></div></div>