ajsie
ajsie

Reputation: 79686

what is a deployment descriptor and do i really have to care about it when using Netbeans?

actually, what is a deployment descriptor?

do i really have to care about it when using Netbeans, cause i read something that it was optional. and that you could use annotations instead of configuring in xml files?

could someone give me the whole picture of this?

Upvotes: 7

Views: 10768

Answers (2)

Srini Karthikeyan
Srini Karthikeyan

Reputation: 772

Deployment descriptor (web.xml) helps us to configure and provide mapping for URL's to respective servlets or JSP's. It is the configuration file used to specify security filters, error page handlers, default pages etc..

Refer this link for clear documentation: https://cloud.google.com/appengine/docs/standard/java/config/webxml

Upvotes: 1

danben
danben

Reputation: 83250

A deployment descriptor (likely web.xml in your case, since I think you posted an earlier question about building a webapp) tells the application container how the web app should be configured. This is where you register your servlets and filters, add context parameters, and lots of other useful things.

Here is a link that describes the various parameters and their uses: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/webapp/web_xml.html

If you read that it is optional in NetBeans, it may be the case that NetBeans provides a default for you (maybe it lets you register your servlets through the IDE). Still, it's good to know what goes on in web.xml in case you ever build a webapp without using NetBeans, or need a lower level of configuration than NetBeans provides.

Upvotes: 8

Related Questions