Dúvida com o web.xml

1 resposta
pimenta

No DD, em , há uma tag que é que pode ser usada com REQUEST, INCLUDE, FORWARD e ERROR(não sei se pode com mais alguma coisa…).

Gostaria de saber se alguém pode me explicar pra que serve essa tag e pra que cada uma das suas opções serve?

Abraços,

1 Resposta

pimenta

Pra quem tem/teve/terá a mesma dúvida que eu, segue o que está na especificação Servlet 2.4:

SRV.6.2.5 Filters and the RequestDispatcher

New for version 2.4 of the Java Servlet specification is the ability to configure filters
to be invoked under request dispatcher forward() and include() calls.
By using the new element in the deployment descriptor, the
developer can indicate for a filter-mapping whether he would like the filter to be
applied to requests when:

  1. The request comes directly from the client.
    This is indicated by a element with value REQUEST,
    or by the absence of any elements.
  2. The request is being processed under a request dispatcher representing the
    Web component matching the or using a forward()
    call.
    This is indicated by a element with value FORWARD.
  3. The request is being processed under a request dispatcher representing the
    Web component matching the or using an include()
    call.
    This is indicated by a element with value INCLUDE.
  4. The request is being processed with the error page mechanism specified in ?Error
    Handling? on page 73 to an error resource matching the .
    This is indicated by a element with the value ERROR.
  5. Or any combination of 1, 2, 3, or 4 above.
Criado 30 de maio de 2008
Ultima resposta 30 de mai. de 2008
Respostas 1
Participantes 1