I am completely new to JSF and I am doing some basic things to figure out how to work with it. In my one of the projects I have a ManagedBean, SessionScoped, as shown below
@ManagedBean(name="user")
@SessionScoped
public class User implements Serializable
// Having a couple of String properties (with setters and getters).
Now on one page in the form I have <h:inputText id="firstName" value="#{user.firstName}" ... />, which I expect to receive from the user and put in my bean. The second page displays only the input data that can be obtained from the bean. ( <h:outputText value="${user.firstName}"/>).
The problem is that if after that I go to the third page (just by typing the URL) and I try to use the same line to display the data from the bean again, the data is not displayed. I was expecting that while the bean is a member of the session, it should still be available in the current session.
user244597
source
share