struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgou...@sears.com
Subject problems with bean:write tag
Date Fri, 15 Feb 2002 19:05:14 GMT

I am putting an object in the session from my Action class.
like this:
myObject = SomeOtherClass.getMyObject();
HttpSession session = req.getSession();
session.setAttribute("MyObjectKey", myObject);

Then in my forwarded JSP,
I am using <bean:write name="MyObjectKey" property="password"/>

This is the exception I get:
javax.servlet.jsp.JspException: No getter method for property password of
bean myObject
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:536)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)

The funny thing is, if I do a "session.getAttribute("MyObjectKey")" and
then do <%=myObjectReference.getPassword()%> in my JSP,  I am able to print
the property's value without any problem. So, the object is in fact in the
session and ofcourse has the getter method too.

Then what is wrong?

Anybody else faced the same problem?

Thanks,
-Shyam Gourisetty



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message