aspose file tools*
The moose likes Servlets and the fly likes Need Beginners resource for Filter And Listener Topic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need Beginners resource for Filter And Listener Topic" Watch "Need Beginners resource for Filter And Listener Topic" New topic
Author

Need Beginners resource for Filter And Listener Topic

Ashish R Srivastava
Greenhorn

Joined: Oct 18, 2011
Posts: 7

Hello to Guru's,

I am taking a classroom training on JAVA. In Servlet topic, I am not getting clearance in the topics mentioned below :

1. FILTER
2. LISTENER

Can anyone provide me the Beginner's tutorial/ ClassNotes for this topic along with simplified example. Also please guide me the scenario where one should use the concept of filter in a Project.

Waiting to see your kind and early response..!!!


A new BEE in the world of JAVA.
Thanks in advance to the seniors for their kind Help..!!!
olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

hi,

you can first start at the source (at oracle):

For filters

http://www.oracle.com/technetwork/java/filters-137243.html
or
http://download.oracle.com/javaee/5/tutorial/doc/bnagb.html#bnagc


For listeners

http://download.oracle.com/javaee/5/tutorial/doc/bnafi.html#bnafk


Ashish R Srivastava
Greenhorn

Joined: Oct 18, 2011
Posts: 7


Hi olivier,

Thanks for the resource. In the mean time, if you have any Class Notes or Lecture Notes with you then please share it with me..!!

Hope to see your reply again..!!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

Did you try to have a look in the Head First Servlets and JSP book? These concepts are clearly described with some good examples.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Ashish R Srivastava
Greenhorn

Joined: Oct 18, 2011
Posts: 7

Hi olivier,

I am not getting time to scan Books, as I am a working professional. So i am searching for the resource which provide me the quick way to grasp this topics..???
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Ashish R Srivastava wrote:Hi olivier,

I am not getting time to scan Books, as I am a working professional. So i am searching for the resource which provide me the quick way to grasp this topics..???


Atleast you can have *some* time to search in Google (as an alternative), which can throw umpteen results

I second Joe Harry. HFSJ is an excellent book and I bet no one can go without understanding after reading the book.

As you are in hurry, I give few info on the topics you asked for.

1. Filters -- are components that are used before and after processing the request. That is they are acting as a layer intruding the processing of any request. So if you want to do any actions before and/or after processing your request you can use a filter. Sometimes you may need to do some additional checking or setting (like users currency preference or regional settings etc.,) that can be set in the filter before the request is actually handed over to the Servlet. Likewise, once the servlet had processed the request, filters can do some additional activities on the response like zipping the output content by viewing the content type (if he preferred a compressed version if any).

2. Listeners -- are components who can be activated based upon an event. Like whenever an event happens, the listeners would be invoked by the container. For which you have to register the listener with the container against a particular servlet (or set of servlets). The event may be when an object is added/removed to the context, a servlet is created/destroyed, session creation/destruction etc., A good example is like a Form submit button. Only when you click on the submit button the data in the form is sent to the server, until then all are keeping quiet Likewise, listeners act until they are invoked by the container for a specific event!

I hope this helps.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

This is a link from which you can get a decent information about filters.
Ashish R Srivastava
Greenhorn

Joined: Oct 18, 2011
Posts: 7

Many Thanks Raghavan,

I got A very usefull resource from your side.

Can you please help me in my other Thread issue :

http://www.coderanch.com/t/556218/JSP/java/PWC-Unable-initialize-TldLocationsCache#2523772

Hope to see your kind and early response..
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

You are welcome.

Let me see the other thread, and what best I can do.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Ashish R Srivastava wrote:I am not getting time to scan Books, as I am a working professional.

Most people here are working professionals. If you don't "get time" to read books you are going to have a hard time keeping up.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Bear Bibeault wrote:
Ashish R Srivastava wrote:I am not getting time to scan Books, as I am a working professional.

Most people here are working professionals. If you don't "get time" to read books you are going to have a hard time keeping up.


Well said Bear I second you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Beginners resource for Filter And Listener Topic