tags:

views:

27

answers:

1

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?

+3  A: 

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.

danben
the link u provided was for oracle. is this the same thing if im using glassfish?
weng
Yes. `web.xml` is a J2EE standard.
Carl Smotricz
and then we got application.xml too. and some other .xml files. are all these using same values or will i have to look these up as well?
weng
it looks like a front end controller. redirecting which url-path to which servlet. couldnt they just have said that as an example instead of just throwing out empty words=) so typically in the java world. They have forgotten what KISS means.
weng
Not really sure what you mean by front end controller. Mapping url paths to servlets is one thing that happens in web.xml, but certainly not the only thing.
danben