I'm building a java web app using tomcat 8.5 + JSP files.
When I'm running the servlet on my local windows machine everything is working fine, but when I deploy it to a remote Linux (ubuntu 16.4) machine, I can only get to the home page - every link I click on it that's supposed to go through the controller is not working.
My controller class:
public class Controller extends HttpServlet {
    private static final long serialVersionUID = 102831973239L;
    /**
     * @see HttpServlet#HttpServlet()
     */
    public Controller() {
        super();
    }
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            request.getRequestDispatcher("/home.jsp").forward(request, response);
    }
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
        String path = request.getPathInfo();
        switch (path)
        {
            case "/login":
                String res = "test";
                HttpSession session = request.getSession(false);
                session.setAttribute("result", res);
                response.sendRedirect(request.getContextPath() + "/home.jsp");
                break;
        }
    }
}
home.jsp:
<header id="header" >
    <h1>My site</h1>
     <br/>
    <form action="/controller/login" method="post">
        Enter ASOS link:<br>
        <input type="text" name="pdrUrl" required>
        <br><br>
        <input type="submit" value="Compare">
    </form>
    ${result}
</header>
When I click the submit button on the form element I'm redirected to http://:8080/controller/login
Why doesn't it going through the controller like my local windows machine?
Thanks.
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         id="WebApp_ID" version="3.1">
    <servlet>
        <servlet-name>myServlet</servlet-name>
        <servlet-class>controller.Controller</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>myServlet</servlet-name>
        <url-pattern>/controller/*</url-pattern>
    </servlet-mapping>
    <error-page>
        <error-code>404</error-code>
        <location>/controller/error</location>
    </error-page>
</web-app>
 
     
     
     
    