Quick question -

I have a web application built on Struts 1.2.9. The home page places a
"user" object in the current session when it executes using the following
code:

.

//Call common methods

userSession = getUserSession(request);

request.getSession().setAttribute("userSession", userSession);

.

One of the tiles in my jsp layout reads out values from my userSession bean
using the following code:

.

<bean:write name="userSession" property="domain(Primary)"/>

.

This works fine, and the home page displays correctly. Some links from the
home page use action forwards directly to jsp pages with no Action classes
associated with them. In these cases, I again try to read values from the
userSesison bean (as above) and I get a "javax.servlet.jsp.JspException:
Cannot find bean: "userSession" in any scope" error when these jsp pages are
loading. Why is this happening? If I've already put the "user" object in the
session when the user first hits the home page, shouldn't that object
persist to other jsp pages??

 

Thanks,

Darren

Reply via email to