• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mapping is not working

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Whatever. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic