I am using a HttpURLConnection (con) object and trying to do: con.setRequestProperty("Cookie", cookie); [Note: cookie is a plain string that I got from a different method written to return cookie in the prescribed format as a string like $Version=0; JSESSIONID=5598BB8D8B4F2F69A3D8AA16677EE534; $Path=/jasperserver-pro]
Constantly hitting 403 error :(
Any pointers will be really helpful.
I was able to resolve the same. Problem : I was also trying to put the "Cookie: " in front of $Version, while trying to set the cookie via setRequestProperty
Actually the jaspersessionid value should be set in the header of the request, not as a property. Also, I'm writting COOKIE instead of Cookie, and I don't use the $Version property, and I don't use the '$' character before the 'Path' property.