Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

ServletContext.getAttributeNames

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why shouldnt this return an empty Enumeration ever? i searched the specs but there was nothing in it nor in the Api sheet
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ted mosby wrote:why shouldnt this return an empty Enumeration ever?


What happened when you tried it?
 
Sheriff
Posts: 6611
1253
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ted mosby wrote: i searched the specs but there was nothing in it nor in the Api sheet


http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getAttributeNames()
 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Ted.

ted mosby wrote:why shouldnt this return an empty Enumeration ever?



Container/Server sets the necessary attributes like in application scope inorder to use it for internal purposes. If it is Tomcat it sets the attributes

For attribute name 'org.apache.catalina.jsp_classpath' it stores the classpath pointing to various jar files.
 
I'm still in control here. LOOK at this tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic