I am novice in servlet development and I want to map these URL patterns to my BookController Servlet:
- mysite.com/Books/Add
- mysite.com/Books/Delete/1
How they can be mapped using Annotation or web.xml and can I process both of them inside doGet() method?
public class BookController extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException {
}
}