File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Query abt ServletContextAttributeListener Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Query abt ServletContextAttributeListener" Watch "Query abt ServletContextAttributeListener" New topic
Author

Query abt ServletContextAttributeListener

Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
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


<B>Bhupendra Mahajan</B>
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
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

Joined: Oct 17, 2001
Posts: 224
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).]


Win
faiza haris
Ranch Hand

Joined: Oct 17, 2000
Posts: 173
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

Joined: Aug 18, 2001
Posts: 36
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.


SCJP, SCWCD
Reda Mokrane
Ranch Hand

Joined: Jul 25, 2001
Posts: 231
hi Mahajan,
where is the links of the listeners examples?
Thanks
 
 
subject: Query abt ServletContextAttributeListener
 
Threads others viewed
which listener should not be registered in web.xml ?
A Couple of Names of The Listener Interfaces
Listeners
JSP & JMS
HttpSession Object Persist Across Restart
IntelliJ Java IDE