Multiple choice technology web technology

Which JSF expression references an application's context path?

  1. #{contextPath}

  2. #{requestContextPath}

  3. #{facesContext.externalContext.requestContextPath}

  4. ${request.contextPath}
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JSF, the full expression #{facesContext.externalContext.requestContextPath} accesses the external context to retrieve the request’s context path, which is the correct way to reference the application’s base URL. The other shorter forms either reference non‑existent properties or use the wrong EL syntax, making them incorrect.