• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Multiple url-pattern in servlet

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I associate multiple <url-pattern> with my deployed servlet.
If not is there any alternative.
Thanks in advance
 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can make a number of different mappings to the same <servlet>.
 
Pradeep Sahoo
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Asher,
I would like to know how to configure the web.xml file for the same.
I tried giving multiple entries for <url-pattern> tag under the same servlet. But the descriptor could not be parsed by the Server.
Please help
Thanks once again
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would like to know how to configure the web.xml file for the same.
I tried giving multiple entries for <url-pattern> tag under the same servlet. But the descriptor could not be parsed by the Server.


Servers do seem to be picky about the order of elements. The real authority on web.xml is the servlet API - you can download it from java.sun.com as a pdf file. Alternate explanation would be that your web.xml file is ill-formed.
Bill
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is how I and Netbeans do it;
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic