Servlet XML Configuration
Step 1: Create a simple class and extend it with httpservlet and create doGet method:
Step 2 : Create servlet and servlet mapping in web.xml
Step 3: Run the app and hit the URL:
Step 4: Check the console:
Annotation
Xml
1) Less code and easy to write
1) More code , difficult to maintain
2) Need to build code on every change
2) No need to build simply bounce the server on every change
Last updated
Was this helpful?