Flashcards
Sem título
Flashcards do conjunto (8)
- 1What are the steps to creating a filter?implement the filter interface
- 2What are the methods you need to implement the Filter interface?1. doFilter()
2. init()
3. destroy - 3Where do you put filtering behaviour?doFilter()
- 4What the arguments of doFilter?1. ServletRequest
2. ServletResponse
3. FilterChain - 5What are the generla 5 steps to creating a filter?1. create a class that implements the filter interface
2. put filtering behaviour in doFilter
3. call do Filter method of the FilterChain
4. Register the filter w/ the appropriate servlets and JSP pages
5 disable invoker servlet - 6What is the basic code for doFilter method?public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws ServletException, IOException {
…
chain.doFilter(request,response);
} - 7Where do you declare the filter?in the deployment descriptor
- 8Can a filter read/write web application wide parameters?Yes, you use methods in ServletContext
Informações
- Descrição
- FlashCards sobre Sem título, criado por vincewong22 em 04-04-2015.
- Criado por
- vincewong22
- Visualizações
- 1
- Avaliação