You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig Weinstein <cw...@mbcsystems.com> on 2001/04/05 15:12:28 UTC

getAttributeNames doesn't return application level objects

I am trying to get a list of all application level objects that where
defined in jsps.

I have a jsp that utilizes an application level object.

<jsp:useBean id="varName" class="MyClass" scope="application">
</jsp:useBean>

In my Servlet, I try to access this object by

    ServletContext context = getServletContext();
    Enumeration enumNames = context.getAttributeNames();


But getAttributeNames() does not return my object name.  My problem may be
because the Servlet is in a different directory than the .jsps.  Does the
servlet need to be in a specific place in order to access the application
objects?