title: how jsf get server url
body: <p>all</p>
  
  <p>My web project run in tomcat.Its path is<code>http://localhost:8080/test/index.html</code>.</p>
  
  <p>How to get the url = "http:/localhost:8080/test/" throught ExternalContext?</p>
  
  <p>thanks advanced.</p>