what are filters in java servlets



Share on Google+Share on Google+

what are filters in java servlets
2 Answer(s)      5 years and 5 months ago
Posted in : Servlet Interview Questions

what are filters in java

View Answers

May 7, 2012 at 4:25 PM

Filters are powerful tools in servlet environment. Filters add certain functionality to the servlets apart from processing request and response paradigm of servlet processing. Filters manipulate the request and response in a web application, and they can be applied to any resources like HTML, graphics, a JSP page which are served by the servlet engine. Authentication of data, format conversion of data and redirecting the page to another page are certain useful functions of filters.

A filter is configured in a web.xml file. The class using the filters should extend javax.servlet.Filter. Every request in a web application, the servlet container decides the filters to apply and adds them to the filter chain, in the order they appear in web.xml file. A filter also has life cycle mechanisms init(),doFilter() and destroy().

July 24, 2012 at 9:44 AM

off course wew have several mechanisms for that like redirecting page to another page (request dispatcher). all these functionalities can be implemented in controller itself then why we are going for filters


Related Tutorials/Questions & Answers:
filters in java - Struts
filters in java  I have implement Gzip filters in my web application, but web.xml is not supporting to filters in struts, i have implement the same code for servlet its working fine on local host but online web.xml is creating
Filters  Where we use Filters in the project? give one example code, how to use Filters to provide security for the application
what are filters in java servlets  what are filters in java   Filters are powerful tools in servlet environment. Filters add certain functionality to the servlets apart from processing request and response paradigm
making use java image filters
making use java image filters  while making use any functions built in jerry's filter in java application i get a NullPointerException.. I dont know the reason for this.. please give me a solution
What is Java Servlets?
What is Java Servlets?      ... enabled web server. Servlets run entirely inside the Java Virtual Machine. Since.... Servlets can access the entire family of Java APIs, including the JDBC API
java servlets
java servlets  please help... how to connect java servlets with mysql i am using apache tomcat 5.5
java servlets - Java Beginners
java servlets  hai my question is on xml documentation in creation of a java servlets. whether we have to create for each and every servelet we have to create each xml documentation?   Hi friends Exactly what you
servlets - Java Beginners
servlets  what is the difference b/w servlets and JSP, what servlets... to respond to HTTP requests. A JSP layered on top of Java Servlets. Whereas..., The Java Servlet is the fundamental component to using Java for web
Java Servlets
Java Servlets  If the binary data is posted by both doGet and doPost then which one is efficient?Please give me some example by using both doGet and doPost. Thanks in Advance   The doPost method is more efficient
servlets - Java Beginners
servlets   I am doing small project in java on servlets. I want to generate reports on webpage ,how is it possible and what is the difference between dynamic pages & reports ? tell me very urgent pls,pls
servlet filters
filters and can u post smple application to search webpage based on input values?    Hi venkatash, In servlets the filters are used to develop.... According the servlet specification the filters are used for to store the loggin
servlets - Servlet Interview Questions
what is servlets in Java  what is servlets in Java
servlets  what is the duties of response object in servlets
what are advantages of servlets  what are advantages of servlets   Please visit the following link: Advantages Of Servlets
servlets - Java Beginners
servlets  Hello! am doin my servlet course at niit, i want know in detail methods of servlets,and where can we implement it i.e. i want to know the examples of the methods used in it. what is getInParameter(); does.please
Servlets - Java Interview Questions
Servlets  What is the difference between servlet context and servlet... and are available to all the servlets within that application. It represents your web... are specified for a particular servlet and are unknown to other servlets
java struts servlets writing - Struts
java struts servlets writing  sir..i am using eclipse here for software development.and i just want to know what all are the neccessary steps to write servlets pragrams for stuts applicatuin.here am developing a small application
Servlets - Java Beginners
Servlets  Hi, How can i run the servlet programon my system? I wrote the code in java.(I've taken the Helloworld program as example program... for more information, http://www.roseindia.net/servlets/ Thanks Amardeep
java servlets jdbc - JDBC
java servlets jdbc  i am running the servlet program with jdbc connections in this porgram i used two 'esultset' objects.. in this wat ever coding is available in the first resultset is executed like updating and retrieiving
java servlets - Java Beginners
java servlets  i want to close window when ever he logout from one page... this closing is done with yes/no option. when ever press "yes" it means he successfully logout from page. if press "no" it means he not logout from
servlets - Java Interview Questions
html and processing in servlets and store in DB like ORACLE. And next i want to retrieve this image into web page using servlets. please try to send the answer to me servlets. i was not strong otherthan this. so please send me answer using
java servlets with database interaction
java servlets with database interaction  hai friends i am doing a web application in that i have a registration page, after successfully registered... "not enough values" can you please assist how to get rid of this problem what problem
What is Java?
What is the use of Java
servlets bulk - Java Beginners
servlets bulk  Hi, My problem is " i want to send a one mail to many persons(i.e.,same mail to many persons) using servlets". Pls help me.  Hi Friend, Please visit the following links: http
servlets mails - Java Beginners
servlets mails  Hi, My problem is " i want to send a one mail to many persons(i.e.,same mail to many persons) using servlets". Pls help me.  Hi Friend, Please visit the following links: http
what is the architecture of a servlets package  what is the architecture of a servlets package   The javax.servlet package provides interfaces and classes for writing servlets. The Servlet Interface The central
java Servlets - JSP-Servlet
java Servlets  Hi i am having a doubt regarding servlets as i am in learning stage give me any clew how to retrive data from mysql database after getting data from db and again i have to add that data to textbox using html
java servlets - JDBC
java servlets  First thank you sir for your reply sir i am using "Oracle Database" it asking for 1.User Name 2.Password 3.Host String if we... oracle database it asks global sid what u give it is hoststring default
servlets - Java Beginners
servlets   Q: i write program to upload image into perticular folder.but i want to store that path into database but not image and display that image in page from the db.pls any one send me code for that in servlets asap.pls
servlets deploying - Java Beginners
servlets deploying  how to deploy the servlets using tomcat?can you...); } } -------------------------------------------------------  This is servlets.... http://www.roseindia.net/servlets Thanks Amardeep
servlets  why we require wrappers in servlets? what are its uses? Please explain   These wrappers classes help you to modify request...://www.roseindia.net/servlets/response-filte.shtml


Advertisement null