initialization of the objects with application scope
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matt_Koss
Posted On:   Tuesday, May 15, 2001 07:37 AM

Can I access application object (and consequently its init parameters) within a constructor of my bean ?
Bean has a scope="application".

At the moment I wrote a bean with a special method initialize(), to which I then pass application object from the JSP.

But then I need to call it explicitly from the JSP, which I am trying to avoid.
I would really like the bean to initialize itself in its constructor, but then I need to access somehow the application object.

Re: initialization of the objects with application scope

Posted By:   John_Zukowski  
Posted On:   Tuesday, May 15, 2001 11:42 AM

JSP calls the no-arg constructor for beans. If you need to initialize something by passing an argument from the JSP page, you have to do it outside the constructor.
About | Sitemap | Contact