Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

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?

like image 699
ajsie Avatar asked Jan 10 '10 17:01

ajsie


2 Answers

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.

like image 105
danben Avatar answered Nov 19 '22 11:11

danben


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

like image 30
Srini Karthikeyan Avatar answered Nov 19 '22 11:11

Srini Karthikeyan