what is web.xml?and its use?

Answer Posted / sathish s t

web.xml file is the configuration file for your web application project ,each web application project should have this file and don't give another name instead of web.xml(default)

uses:
After the server(tomcat) get the request from the user, that ask the servletcontainer, where to find the servlet.The servletcontainer tells to tomcat, to go web.xml configuration file.In this file the servlet-mapping element gets the URL from the tomcat and maps the corresponding servelt.Then the tomcat take that servlet and gives response to user.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of object cloning?

795


What are latest features introduced with java 8?

831


How do constructors use this() and super()?

818


What is anti pattern in java?

743


What is meant by call by reference?

761


What does the three dot emoji mean?

831


Why do we need data serialization?

751


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

2031


What are the features of junit?

837


Define how can we find the actual size of an object on the heap?

911


How to sort double array in java?

793


how its run?

822


Can we override private methods?

777


What is return null in java?

716


Why are lists ordered in java?

795