This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes question regarding to servlet 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "question regarding to servlet 3.0" Watch "question regarding to servlet 3.0" New topic
Author

question regarding to servlet 3.0

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 998
    
    2
hi all,
servlet 3.0 is annotation based, we use annotations instead of web.xml.
but as far as i know we use servletcontext and servletconfig because we want a centralized control to our application, i mean we use servletcontext and servletconfig because if any change is required we need to do that only in web.xml and effects will be seen on the whole application.
for ex: we define our database connection in web.xml and, later we require to change that we need to do that at one place only.

but my question is: how is it possible with annotations?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Not everything is possible with annotations. There are some things that a deployment descriptor is needed for.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: question regarding to servlet 3.0