Solution # fetch the login page curl -b cookies.txt -c cookies.txt \ http://www.example.com/servlets/login.do # post the login request, updating the cookies.txt file as .