Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Unable to access tomcat protected resource using Cookie manager for JSessionID

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic