Getting to an object from JSP
Ed Thompson <[email protected]> Tue, 30 Sep 2003 17:14:55 -0400
| Newsgroups | gmane.comp.web.maverick.general |
|---|---|
| Organization | The Thompson's |
| Message-ID | <[email protected]> |
OK I think I have the model thing figured out, alotgh I am not sure how
my JSP knows what kind of object the model is representing (how does it
know there is an attribute called 'name' for instance?)
Now, my 'controller' creates an object that I want to have session
scope, and be able to access it from my JSP page when some other object
is the model.
So, I saved it by using:
this.getCtx().getRequest().getSession().seAttribute("object1", obj);
Now I want to get to it from a JSP(similiar to useBean) and call one of
its methods.
How do I do it? Is the setAttribute approach the 'right' way to start?
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]