Since you've stated that the information will never change, storing it in a string in the bean class would work, and use getter methods to retrieve the data
@ManagedBean
@SessionScoped
public final class Airlineimplements Serializable
{
private static final long serialVersionUID = 47493274L;
private String title = "Air Canada";
private String headquarters = "Toronto Ontario Canada";
public Airline()
{
}
public String getTitle()
{
return title;
}
public String getHeadquarters()
{
return headquarters;
}
}
This is @RequestScoped
so that you retrieve the information on each request and the information is garbaged after the request.
A @RequestScoped
bean will be garbaged by end of every request and recreated on every new request.
Full answer here about @ViewScoped
vs @RequestScoped
Difference between View and Request scope in managed beans
Although this should be @SessionScoped
which keeps the information for the life of the session.
For the Serializable UID, the serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to ensure that the caller and receiver of a Serialized object have the same loaded classes.
More information about Serializable
http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html
Here are some additional tutorials on JSF for beginners
http://www.tutorialspoint.com/jsf/
http://www.vogella.com/tutorials/JavaServerFaces/article.html