In my j2ee (myfaces + spring) application I have a session managed bean called UserSessionBean where I stored the data about the logged user.
That class is marked as Serializable
In a method I have to retrieve an HttpRequest parameter and i'm using HttpServletRequest:
public class UserSessionBean implements Serializable {
public String getLang() {
HttpServletRequest req = (HttpServletRequest) FacesContext
.getCurrentInstance().getExternalContext().getRequest();
String sessUsr = req.getHeader("PARAMETER");
}
I got an exception on WebSphere Application Server saying that the class is not Serializable.
How can I fix this?