JSF page doesn't show anything; I add the JSF framework to the lib folder but no HTML form or result when I run (submit) the page on server.
The IDE I'm using is: Eclipse.
Here my java code :
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
@ManagedBean
@ApplicationScoped
public class Counter {
public Counter() {}
private int value = 0;
public String CounterValue() {
setValue(getValue() + 1);
return "counter";
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
}
Here my XHTML code :
<!DOCTYPE html>
<html
lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<h:head>
<title>Hello world - form</title>
</h:head>
<h:body>
<h:form>
Counter Value : #{counter.value}
<h:commandButton value="submit" action="#{counter.counterValue()}"/>
</h:form>
</h:body>
</html>
And this is the result :