Reputation: 2932
I should preface this question by saying that I am new to JavaServer Pages. I have been researching the purpose and use of the deployment descriptor (commonly referred to as web.xml). I found this document which says that some Java annotations can be used to describe things that would typically be put in the deployment descriptor. So, my question is:
Upvotes: 0
Views: 498
Reputation: 9255
That is sort of the point. Rather than using web.xml
, you would annotate your classes that fulfill those various functions. A Servlet would be annotated with @WebServlet
, a Filter with @WebFilter
, etc.
Here's a good article: http://www.servletworld.com/servlet-tutorials/servlet3/new-features.html
Note that this is a common trend in Java EE - the move away from XML configuration to annotations. Spring, for example, is following this trend with the v3.1 introduction of @Configuration
classes which can take the place of XML config files.
Upvotes: 2