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

Filters invocation  RSS feed

 
Radhakrishna Bhat
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In web.xml the url-patterns for filters are

/Radha/*

/Radha/Krishna

/*


If the browser's url is /Radha/Krishna. The filters invocation is like

/Radha/*

/*

/Radha/Krishna


Why?

But as far as i have heard web.xml decides which comes first and last? Also the longest matching URL takes priority right?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For each filter the longest matching URL pattern is the one that should be used.

If you have multiple filters, the order in which they are invoked is determined their order in your deployment descriptor. There is a link to the servlet spec in my signature. This is the best place to go for questions like this.

Since filters are covered in the servlet spec, not the JSP spec, I'm going to move this thread to our Servlets forum.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!