Antony,
The pageContext bit won't work because the method doesn't exist (I was just guessing
it might).
Instead, it looks like there's a better way to do the whole thing. You can use the
method:
Enumeration PageContext.getAttributeNamesInScope(int scope)
to get the attribute names at each level of scoping. Just use one of:
PageContext.PAGE_SCOPE
PageContext.REQUEST_SCOPE
PageContext.SESSION_SCOPE
PageContext.APPLICATION_SCOPE
for the scope parameter.
--Chris
12/11/2001 6:14:14 PM, Antony Stace <[EMAIL PROTECTED]> wrote:
>Thanks for the reply Chris. I just ran your code and it works fine, except for the
>
>
>Enumeration enum = pageContext.getAttributeNames();
> while( enum.hasMoreElements() ) {
> out.println( enum.nextElement() + "<br>" );
> }
>
>My jsp page is hanging on the pageContext.getAttributeNames() line. Any
>ideas why, the request.getAttributeNames(), session.getAttributeNames()
>and application.getAttributeNames() calls work fine.
>
>Cheers
>
>Antony
>
>
>
>
>
>> <%
>> Enumeration enum = pageContext.getAttributeNames();
>> while( enum.hasMoreElements() ) {
>> out.println( enum.nextElement() + "<br>" );
>> }
>>
>> enum = request.getAttributeNames();
>> while( enum.hasMoreElements() ) {
>> out.println( enum.nextElement() + "<br>" );
>> }
>>
>> enum = session.getAttributeNames();
>> while( enum.hasMoreElements() ) {
>> out.println( enum.nextElement() + "<br>" );
>> }
>>
>> enum = application.getAttributeNames();
>> while( enum.hasMoreElements() ) {
>> out.println( enum.nextElement() + "<br>" );
>> }
>>
>> %>
>>
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com