• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

servlet-mapping

 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys
is <servlet-mapping> mandatory for all <servlet> tags in web.xml
i have also read that every <servlet> tag should have <servlet-mapping>
but i found only <servlet> tag for quartz configuration like below


i also found quartz timier is working properly
also my application is running properly
looking for your replies
amir
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A mapping is only needed if you want to hit your servlet from the web.
It looks like Quarts is using this servlet for initialization purposes only (so it needs no mapping to be hit from the web).

Note: I'm guessing this code is somewhat old. Starting with Servlet Spec 2.3, the preferred way to initialize web applications is to use a context listener; not a servlet. These days, there is no reason why servlets should be written to do anything other than respond to HTTP requests.
 
ice is for people that are not already cool. Chill with this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic