Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Beginners resource for Filter And Listener Topic

 
Ashish R Srivastava
Greenhorn
Posts: 7
Java MyEclipse IDE MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..!!!
 
olivier dutranoit
Ranch Hand
Posts: 81
IBM DB2 Eclipse IDE Java
 
Ashish R Srivastava
Greenhorn
Posts: 7
Java MyEclipse IDE MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 10045
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try to have a look in the Head First Servlets and JSP book? These concepts are clearly described with some good examples.
 
Ashish R Srivastava
Greenhorn
Posts: 7
Java MyEclipse IDE MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a link from which you can get a decent information about filters.
 
Ashish R Srivastava
Greenhorn
Posts: 7
Java MyEclipse IDE MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome.

Let me see the other thread, and what best I can do.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic