I have followed john's suggestion, but still have this problem. Looking into the response header from the web server, I have this line:
Set-Cookie: JSESSIONID=DpliYuMrBA3YhPg3RhgAtKrAQPFNq17N6Orhghg5TkgUugEam0Tu!-812882274; path=/ but the cookie is not really saved in the cookie file, so the application won't get access... I have setup cookies this way: my $cookie_jar = HTTP::Cookies->new(file=>"testcookies.txt", autosave=>1); $ua->cookie_jar($cookie_jar); In the file testcookies.txt I can find the other cookies but not the JSESSIONID...