I’m trying to do a file upload in Flex using it’s FileReference class.
This works great in IE, but bombs in FireFox and Chrome. The issue is that Flex starts a new process for the POST but does not pass the authenticated user cookie with this request. The server gets the request, but attempts a redirect to the login page and… BOOM – 2038 Error!
I read here that I can pass the cookie information in the URL. I have not gotten this to work yet. Here are my questions:
- Is this a standard feature in all servers to accept cookies in the URL (ours is Glassfish)?
- Does the cookie portion of the URL start with the semi-colon (“;”)?
- Can I add more than one cookie value and are those also delineated with semi-colons?
You can’t pass cookies in the URL. You can pass session ID if server supports it. Java Servlet containers do support it (it’s in Servlet spec) by using
jsessionidpath parameter. Just make sure;jsessionid=...is right after the path, before query (it’s called “path parameter” for a reason).To your questions:
jsessionidpath parameters. In general, you can’t pass any cookie this way.