Jorge, 1. I believe Struts PlugIns were initially created because, at the time, the servlet spec didn't have ServletContextListeners. So, why are you mixing the two instead of just using a ServletContextListener?
2. Did you define the PlugIn in your struts-config.xml (or similar file that you are sure is loading? 3. Have you done a simple logging in your PlugIn to ensure the plugIn is loaded? 4. Have you done a simple logging in your JSP to ensure that the main object, __APPLICATION_CONTAINER_KEY can be found? 5. Have you tried to find the object saved under the key "__APPLICATION_CONTAINER_KEY" inside an action to be sure you can reach it normallly? 6. Are you using Action 1 or Action to and what specific version? Regards, David -----Original Message----- From: Jorge Martín Cuervo [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 5:05 AM To: Struts Users Mailing List Subject: Re: Cannot find bean under name __APPLICATION_CONTAINER_KEY.area anyone have used a container to store application scope data? please, let me know if it's a bad practice. El mar, 16 de 05 de 2006 a las 17:15, Jorge Martín Cuervo escribió: > Hi all, > > <h2><fmt:message key="search2.filter.job.title"/></h2> > <p class="pEstrecho"> > <span><fmt:message key="search2.filter.job.sector"/></span> > <html:select property="industryCode" styleClass="selectAncho"> > <html:options collection="industryCodeMap" > property="key" labelProperty="value"/> > </html:select> > </p> > > I use html:select with html:options to populate the options from the > application scope. > In the application scope i have a attribute called "industryCodeMap" > with a Map that contains the data. > I used a ServletContextListener to load the data on the webapp startup > and goes fine. > > Now i want to change the startup process with struts plugin, and also > works good with the service. > > [...] > public void init(ActionServlet servlet, ModuleConfig config) throws > ServletException { > > serviceClassName = findServiceClassName(config); > > ItemDAO itemDAO = DAOFactory.getDAOFactory().getItemDAO(); > > ApplicationContainer container = new ApplicationContainer(); > > container.setSector(itemDAO.getItems(IConstants.SECTOR_BLOCK_NAME)); > container.setArea(itemDAO.getItems(IConstants.AREA_BLOCK_NAME)); > > container.setCoutries(itemDAO.getItems(IConstants.COUNTRIES_BLOCK_NAME)); > > container.setServiceFactory(this); > > servlet.getServletContext().setAttribute( > IConstants.APPLICATION_CONTAINER_KEY, container); > } > [...] > public interface IConstants { > > String APPLICATION_CONTAINER_KEY = "__APPLICATION_CONTAINER_KEY"; > > [...] > > > I prefer to user a container bean to keep my data, and now i try to > change the html:options to: > > <html:options collection="__APPLICATION_CONTAINER_KEY.area" > property="key" labelProperty="value"/> > and crash with: > > > javax.servlet.jsp.JspException: Cannot find bean under name > __APPLICATION_CONTAINER_KEY.area > > > the questionm is, how can i access to the container and then the > property area? -- ;-) ____________________________________ Jorge Martin Cuervo Analista Programador Outsourcing Emarketplace deFacto Powered by Standards email <[EMAIL PROTECTED]> voz +34 985 129 820 voz +34 660 026 384 ____________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]