I have a requirement to access a web service running inside a tomcat server protected by form_authentication using java application(not browser).
I tried the following code to get the JSESSIONID as a cookie and set it using the default cookie manager in all the outgoing request. But for some reason the tomcat always redirects the request to the login page and instead of receiving the soap output/or wsdl i am receiving the login page. I tried using a web debugger tool and am able to see the cookie being sent to the server.
Please tell me what I might be doing wrong.
PS: I have written it as a small code to test it please ignore some extra statements which are not adding value
subject: Unable to access tomcat protected resource using Cookie manager for JSessionID