title: Get the web application context path from META-INF/context.xml to produce an outcome for navigating
body: <p>I have a primefaces web application running on tomcat 8. In <code>META-INF/context.xml</code> I defined the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context antiJARLocking="true" path="/syslac"/&gt;
  </code></pre>
  
  <p>While in my view xhtml page I have this fragment code  where p:commandButton has a oncomplete tag that will execute the handleLoginRequest function.</p>
  
  <pre><code>&lt;h:form&gt;
              &lt;h:panelGrid columns="2" cellpadding="5"&gt;
                 &lt;h:outputLabel for="username" value="Usuario:" /&gt;
                 &lt;p:inputText value="#{loginBean.usuarioVendedor.usuarioSistema}" id="username" required="true" label="username" /&gt;
                 &lt;h:outputLabel for="password" value="Contrasena:" /&gt;
                 &lt;h:inputSecret value="#{loginBean.usuarioVendedor.clave}" id="password" required="true" label="password" /&gt;
                 &lt;f:facet name="footer"&gt;
                    &lt;p:commandButton value="Ingresar" update=":growl" actionListener="#{loginBean.loguearse}" oncomplete="handleLoginRequest(xhr, status, args)" /&gt;
                 &lt;/f:facet&gt;
              &lt;/h:panelGrid&gt;
           &lt;/h:form&gt;
  </code></pre>
  
  <p>The script:</p>
  
  <pre><code>      &lt;script type="text/javascript"&gt;function handleLoginRequest(xhr, status, args) 
  {
                  if (args.validationFailed || !args.loggedIn) {
                      jQuery('#dialog').effect("shake", {times: 2}, 100);
                  } else {
                      dlg.hide();
                      jQuery('#loginLink').fadeOut();
                      window.location = args.view;
                  }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But I can not retrieve the context path from <code>META-INF/context.xml</code> through logginBean so that I can send view arg to be used by window.location in navigation: <code>/syslac/page.xhtml</code> where syslac is context path of the application.</p>