I am using Struts 1.1 deployed in Tomcat 4.1 running under JDK 1.3. I have a contact form I am building. It will get the user's email from an object called a UserInfoBean, which is not an ActionForm subclass, but does follow the JavaBean paradigm. It simply holds user info such as first name, last name, etc. Since it isn't associated with any particular form, I didn't make it subclass ActionForm. So my first question is, is this the correct pattern to follow?
Secondly, in my ContactSupportAction class (subclass of struts Action), I attempt to retrieve this bean from the session and call it's getEmail() method. However, the result of (UserInfoBean) request.getAttribute("userInfoBean"); returns a NULL reference. I don't understand why this is happening. I create this bean in a class called GetUserInfoAction, which gets fired right after a user logs in succesfully. The GetUserInfoAction will create a UserInfoBean and place it in the session under the name "userInfoBean". The GetUserInfoAction will forward the user to the home.jsp. In this page I have some <bean:write> tags which reference information in the "userInfoBean" object. And this information displays just find. So I know the bean gets created and succesfully stored in the session. So how come I am not able to find a reference to this object when I attempt to retrieve from the session in my ContactSupportAction class? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]