File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Unable to access tomcat protected resource using Cookie manager for JSessionID Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Unable to access tomcat protected resource using Cookie manager for JSessionID" Watch "Unable to access tomcat protected resource using Cookie manager for JSessionID" New topic
Author

Unable to access tomcat protected resource using Cookie manager for JSessionID

Vaibhav Jaiswal
Greenhorn

Joined: Jan 17, 2008
Posts: 12
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to access tomcat protected resource using Cookie manager for JSessionID