wood burning stoves 2.0*
The moose likes Servlets and the fly likes Is Deployment Descriptor always required? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is Deployment Descriptor always required?" Watch "Is Deployment Descriptor always required?" New topic
Author

Is Deployment Descriptor always required?

Jack Davis
Greenhorn

Joined: Apr 07, 2003
Posts: 22
Is Deployment Descriptor always required when using servlets? Is a web.xml file always required also?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
A web.xml deployment descriptor is not an absolute requirement because you can always use the "invoker". However, using the invoker gets you into all sorts of trouble and bizarre errors, as you can see by browsing the servlet related forums here. Nobody should undertake serious servlet development without understanding and using the web.xml capabilities, so you might as well just "bite the bullet" and learn it.
See some accumulated wisdom about the invoker here.
See Sun's documentation of the servlet APIhere.
Bill
Jack Davis
Greenhorn

Joined: Apr 07, 2003
Posts: 22
Thanks for your reply. So even if the servlet you intend to use is totally behind the scenes, i.e extracting data from a mobile application to a table in the database, the web.xml file should still be involved?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
So even if the servlet you intend to use is totally behind the scenes, i.e extracting data from a mobile application to a table in the database, the web.xml file should still be involved?

Certainly. For example you will be able to use init-params in the web.xml to set variables needed to do your database transaction.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is Deployment Descriptor always required?