I'm quite new in JSF and I'm doing some basic things to get a feeling of how one should work with it. In my one of the projects I have a ManagedBean, SessionScoped like below
@ManagedBean(name="user")
@SessionScoped
public class User implements Serializable
// Having a couple of String properties (with setters and getters).
Now, in one page in a form I have a <h:inputText id="firstName" value="#{user.firstName}" ... />
which I would expect to get a value from the user and put it in my bean's property. The second page just displays the input data, accessing it from the bean. (<h:outputText value="${user.firstName}"/>
).
The problem is that if after that I go in a third page (just by typing the URL) and I'm trying to use the same line to display once again the data from the bean, no data gets displayed. I was expecting that while the bean is session scoped it should still be available in the current session.