2

I'd like to have all the facelets and managed bean into one external jar, but if I put de index.xhtml there I don't konw how to reference it.

If the jar structure is:

 IndexManagedBean.class
 META-INF/
    resources/
       pages/
          index.xhtml 

What is its URL?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Joxeja
  • 43
  • 1
  • 5
  • Please do not mix JSF 1.2 and 2.0 tags. Are you using JSF 1.2 or 2.0? I'll assume JSF 2.0, but you need to remove the JSF 1.2 tag. It'll only confuse the answerers because JSF 1.x and 2.x usually require different answers. – BalusC Apr 23 '12 at 21:56
  • Given the fact that the answer works for you, you're using JSF 2.0. I've edited your question and removed the JSF 1.2 tag. In the future questions, please be more careful with the tags. Don't introduce ambiguity in the questions. – BalusC Apr 26 '12 at 14:27

1 Answers1

1

Assuming that the JAR is placed in webapp's /WEB-INF/lib folder and that you're using JSF 2.x and that webapp's context path is /contextpath, and the FacesServlet is mapped on an URL pattern of *.xhtml then you can reference it by the following URL:

http://example.com/contextpath/pages/index.xhtml

See also

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555