This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Can you rephrase the question? What are you asking?
In general, you *have* to use web.xml. You don't have a choice. You use it to declare key aspects of your web application.
Joined: Aug 20, 2011
we give the <url-pattern> of our servlet in web.xml, and i read somewhere that we can also give this into the servlet itself using annotations, and we can easily change the url-pattern from class itself, no need to go for web.xml..
also i want to know what other things i can do in web.xml??
(ie. we can do error handling.)
For J2EE application web.xml is vital part.And also it is not possible to explain all things because it is depends on situation.but some part i would like explain here
1-par application should have one web.xml file.
2-you can able to define the welcome pages.
3-when server going to deployed any J2EE application it will look for only web.xml first
3-all Servlet entry should we present in this file
4-you can also add filter class
5.you can also mentioned dependency.
10-Session time out
and also many more .i would like to recommend the Head first servlet and jsp .