Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mapping is not working

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hola folks.
I have some questions about servlets mapping (from The J2EE 1.4 tutorial).
we have a servlet called LawnServlet and its pattern is /lawn/*
we have constructed the following request :
/catalog/lawn/index.html
(/catalog is the context)
trying this example at home, the index.html is not accessed.
why ?
thanks.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ALL requests to /catalog/lawn and anything under it are sent to your servlet. Anything after it is effectively thrown away (though you can get it by reading the URL string from the request).
 
Ken Robinson
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to request to hit your object and then cascade (or Chain) to the resource, use a Filter, not a Servlet.

With a Servlet you get full control and the resource is not hit at all.

With a Filter you still get full control, but a call to chain.doFilter() will return control to the next resource (an other Filter, Servlet or static HTML/JPG... file).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic