File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes ContextLoaderListener vs Filter for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "ContextLoaderListener vs Filter for "/*"" Watch "ContextLoaderListener vs Filter for "/*"" New topic

ContextLoaderListener vs Filter for "/*"

arul meh

Joined: Sep 19, 2009
Posts: 27
I am wondering what is the sequence of execution in a web based project -

1) A java class which implements "ContextLoaderListener"

2) A class which acts as a filter and is maped for /*

In my case, I see that first ContextLoaderListener is called first, but before ALL the statements are executed in "contextInitialized" method, I see some methods from "filter" java class getting executed. Can anybody explain me - how request is being processed ?

Ankit Garg

Joined: Aug 03, 2008
Posts: 9465

ContextLoaderListener is not a part of SCWCD objectives. Are you talking about Spring framework??

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: ContextLoaderListener vs Filter for "/*"
It's not a secret anymore!