Simple Servlet page navigation for multiple actions not working
===

I am new to JEE. Working on demo app. Right now have to work with JSP & Servlet with JDBC for learning. 

UserServlet.java manage navigation to all user related list, edit and delete operations. All 3 JSP pages has links to navigate that it. JSP pages are at /WEB-INF/admin/. See the **dispatch method**.

***Someone please tell me what is wrong and how to use the navigation. Fix it.***

**ERROR for all the links:** 

    type Status report
    
    message /Navigation/user/delete
    
    description The requested resource (/Navigation/user/delete) is not available.


**SERVLET:**

    package com.myapp.web;
    
    import java.io.IOException;
    
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    @WebServlet("/user/")
    public class UserServlet extends HttpServlet {
    	private static final long serialVersionUID = 1L;
    
    	public UserServlet() {
    		super();
    	}
    
    	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,
    			IOException {
    
    		// String action = req.getServletPath();
    		String action = req.getPathInfo();
    		System.out.println("doGet action = " + action);
    
    		if ((action == null) || (action.equals("/list"))) {
    
    			System.out.println("/UserList.jsp");
    			dispatch(req, res, "/UserList.jsp");
    
    		} else if (action.equals("/edit")) {
    
    			System.out.println("/UserEdit.jsp");
    			dispatch(req, res, "/UserEdit.jsp");
    
    		} else if (action.equals("/delete")) {
    
    			System.out.println("/UserDelete.jsp");
    			dispatch(req, res, "/UserDelete.jsp");
    
    		}
    	}
    
    	protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,
    			IOException {
    
    		String action = req.getPathInfo();
    		System.out.println("doPost action = " + action);
    
    		if (action.equals("/edit")) {
    
    			res.sendRedirect(req.getContextPath() + "/user/list");
    
    		} else if (action.equals("/delete")) {
    
    			res.sendRedirect(req.getContextPath() + "/user/list");
    
    		}
    	}
    
    	protected void dispatch(HttpServletRequest req, HttpServletResponse res, String page)
    			throws ServletException, IOException {
    
    		String path = "/WEB-INF/admin" + page;
    		System.out.println(path);
    		getServletContext().getRequestDispatcher(path).forward(req, res);
    	}
    }


**JSP Page links. All got same**

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    	pageEncoding="ISO-8859-1"%>
    
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
    
    <tags:layout path="${pageContext.request.contextPath}" title="list of Users">
    	<jsp:attribute name="search">
    		<tags:search />
    	</jsp:attribute>
    	<jsp:body>
    		<span class="right" style="margin-bottom: 3px;"><a href="${pageContext.request.contextPath}/user/list" class="btn btn-success">List</a></span>
    		<br />
    		<span class="right" style="margin-bottom: 3px;"><a href="${pageContext.request.contextPath}/user/edit" class="btn btn-success">Edit</a></span>
    		<br />
    		<span class="right" style="margin-bottom: 3px;"><a href="${pageContext.request.contextPath}/user/delete" class="btn btn-success">Delete</a></span>
    	</jsp:body>
    </tags:layout>
