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

Doubt Regarding Web.xml

 
Nittin singla
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose i am working on some large application including thousands of servlets. Do i need to write each of these in the Deployment Descriptor file(Web.xml)?? Isnt there some shortcut to it?
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Servlets are you using if you use 3.0 you can configure mappings with annotations :-)
 
Nittin singla
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No...I am using the older version...
 
elvadas nono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oups, I think with older version you should put all sevlet instances that the container should load in the deployment descriptors.
With servlet 3.0 API you can use Annotations, Web Fragments to reduce web.xml size,
you can also add servlet programmatically using new feartures of servletContext addServlet( String name, String class) etc..
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A better solution could be using a MVC web framework like Struts2, Spring MVC, Stripes or FrontMan.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this article for information on a patter that can help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic