You can use #{view.viewId}
in EL to get the current view ID.
So, this should make it generic for all pages:
<ul class="nav">
<li class="#{view.viewId == '/home.xhtml' ? 'active' : ''}"><a href="home.xhtml">Home</a></li>
<li class="#{view.viewId == '/about.xhtml' ? 'active' : ''}"><a href="about.xhtml">About us</a></li>
<li class="#{view.viewId == '/contact.xhtml' ? 'active' : ''}"><a href="contact.xhtml">Contact us</a></li>
</ul>
It'd be more DRY if you have a collection of pages somewhere in the EL scope:
<ul class="nav">
<ui:repeat value="#{app.pages}" var="page">
<li class="#{view.viewId == page.viewId ? 'active' : ''}"><h:link value="#{page.title}" outcome="#{page.viewId}" /></li>
</ui:repeat>
</ul>
Note that the <h:link>
will automatically prepend the context path in the URL, so having /
in the view ID doesn't matter.