Skip to Main Content

Why is OC4J changing the name of my cookie?

581731Sep 22 2008 — edited Sep 22 2008
My application includes a servlet filter. In that filter, I am setting a cookie to track some data back on the client. The name of the cookie is "ibms_user" and I post a code snippet below. The problem is that, when it gets back to the browser, the name has been changed to $OC4J_ENCODED_ibms_user.

Here is the code snippet:

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//Convert the Servlet objects to http objects
HttpServletResponse res = (HttpServletResponse) response;
res.addCookie(createIbmsCookie(req.getUserPrincipal().getName(), false));
HttpSession session = req.getSession(true);
. (other, irrelevant code)
Cookie c = new Cookie("ibms_user", "some value");
//Add the cookie to the response.
//Pass on to the next request

There is a known issue with the code above, in that the cookie is getting set before the call to doFilter(). Regardless, I don't understand why the name is being changed.

To complete the picture, you should know that the application is setting up to authenticate against OID and uses OracleSSO (at the web server level, not javasso). The version of OC4J is on Solaris 9 (64 bit SPARC).

Thanks for any hints,
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Oct 20 2008
Added on Sep 22 2008
1 comment