I've been creating a 2 beans in the application scope in a servlet. In the init method of the servlet, I create the beans and then I put them in the application scope with the following:
news= new newsBean();
userInfo= new userInfoBean();
getServletContext().setAttribute("userInfo", userInfo);
getServletContext().setAttribute("news", news);
When I try to access them from a jsp page I use the jsp:useBean tag with the application scope, but when I try to reference them with jsp:getProperty I get an error. However, I can access them with scriptlets. Does anyone know why this is happening?
Thanks,
Sean
news= new newsBean();
userInfo= new userInfoBean();
getServletContext().setAttribute("userInfo", userInfo);
getServletContext().setAttribute("news", news);
When I try to access them from a jsp page I use the jsp:useBean tag with the application scope, but when I try to reference them with jsp:getProperty I get an error. However, I can access them with scriptlets. Does anyone know why this is happening?
Thanks,
Sean