JSF – Add OmniFaces to your project

1. In pom.xml

[code]

<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>2.0</version>
</dependency>

[/code]

2. You should put your xhtml pages under:

[code]src/main/webapp/WEB-INF/faces-views[/code]

3. In your bean for example. Here strange is a xhtml file under the folder stated in point 2:

[code]
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
ec.redirect(ec.getRequestContextPath() + "strange");
[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *