1

I'm trying out Spring and I've met the filter-mapping tag. What is its role when compared to the servlet-mapping tag? Is it executed in the background when the urls are called?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Krt_Malta
  • 9,265
  • 18
  • 53
  • 91
  • 3
    Are you talking about `` in `web.xml`? That's not part of Spring, but of Servlet API. Related question: http://stackoverflow.com/questions/2957165/servlet-vs-filter – BalusC Nov 17 '10 at 16:29
  • Thanks. That link is very good. – Krt_Malta Nov 17 '10 at 16:41

1 Answers1

2

<filter-mapping> specifies when a javax.servlet.Filter is invoked.

Filters are invoked before the servlet they are defined for (you can map a filter to either an URL pattern or to a specific servlet)

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140