| Author |
access to attributes
|
Kaiser Lautern
Greenhorn
Joined: May 11, 2005
Posts: 18
|
|
Hi, Maybe this is a silly question, but here it goes: how can I have access to attributes (request, session or application) from a bean (or any supporting class -i.e. not servlet, not Action, not ActionForm, not JSP)? kaiser
|
 |
alan do
Ranch Hand
Joined: Apr 14, 2005
Posts: 354
|
|
you need to pass in the request object and have a method that does request.getAttribute("attrName"); and return the value in each of your bean or supporting class. otherwise, you need to set the value somehow, say using bean efine from your jsp or do MyBean.setValue(request.getAttribute("attrName");
|
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
|
 |
Kaiser Lautern
Greenhorn
Joined: May 11, 2005
Posts: 18
|
|
Hi Alan, In fact I had already figured out the first method. Now I'm gonna try the second one (MyBean.setValue) Thanks, Kaiser
|
 |
 |
|
|
subject: access to attributes
|
|
|