How can I access an already initialised (in a jsp) JavaBean with "application" scope in a standard Java class. When I try to create the bean it creates another instance of the application scoped JavaBean rather than using the one that already exists.

John Zukowski

You need to pick up the bean out of the servlet context. Don't try to create the bean, that's why you are getting a new instance. See What servlet code corresponds to the various "scope" values for the <jsp:useBean> tag? for how to get at all the different scopes.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact