• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query abt ServletContextAttributeListener

 
Mahajan Bhupendra
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i tried out the examples given on links of listeners..
when trying ServletContextAttributeListener i come to know that
attributeAdded() method is getting automatically called
whenever i start the server ...
does this mean that some attributes are by default get added
to servletContext ??
if yes what are they??
Bhupendra
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Examine the HttpSessionBindingEvent (getName(), getValue()) and find out...
[ Ooops. That should obviously be ServletContextAttributeEvent! ]
- Peter
[This message has been edited by Peter den Haan (edited November 10, 2001).]
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got attributReplaced for "contextAttributeReplaced: org.apache.catalina.WELCOME_FILES".
Not sure why.
[This message has been edited by Win Yu (edited November 10, 2001).]
 
faiza haris
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did anyone figure the answer for this???
Somehow trying the examples, my html form gets screwed. I mean i can't even see the form which i used to see without error b4....
e.g i put the html in tomcatdir/webpages/forms/formhtml
and i see it as localhost:8080/forms/formhtml.html
but i am getting 404 error after the listeners...and dont know how to solve it...the location was perfectly working fine before...Isn't listeners a hard topic to get...i'm spending like 2-3 days on it?
help!!!
 
Rohit Poddar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Certain methods on object implementing ServletAttributeListener get called at container startup time becuase all these containers add some or the other attribute for their consumption, like pointed out by Win Yu (Tomcat adding org.apache.catalina.WELCOME_FILES). I noticed Weblogic also adds attributes at startup time.
 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Mahajan,
where is the links of the listeners examples?
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic