Session in ie7

Hi guys,

I implemented a Filter in my JSF application that works fine in ie6 and firefox. The problem appeared when I used ie7.

It seems like ie7 has a different way to get the session. Here is my code (inside doFilter method):

HttpServletRequest request = (HttpServletRequest)req);

if (request.getSession().getAttribute("activeSession") !=null){

(......)

}else{

(......)

}

This code only checks if there is a session already, so the user can access or not some jsf pages directly by link (before using the login page).... but at ie7 I always get null value!!!

Please, any idea?

Marceli

[889 byte] By [marcelia] at [2007-11-27 11:33:45]
# 1

How and where is this attribute set?

BalusCa at 2007-7-29 16:53:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

The session is set by another classe when the user is authorized. Code (the class extends HttpServlet):

public void setLoginSession(HttpServletRequest request, LoginSessionTO session) {

HttpSession httpSession = request.getSession();

httpSession.setAttribute("activeSession", session);

}

But I think is not a problem because it works in another web browser like I said before.

marcelia at 2007-7-29 16:53:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

try another name for that attribute... maybe you use a "reserved name"

it is best to prefix your own parameters with something like a project (or in case of a framework a company)-Id

Alexander_Jessea at 2007-7-29 16:53:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Thks for all the replies.

Alexander, I changed the attribute but it didn't work either!!

Any more ideas?

marcelia at 2007-7-29 16:53:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Is your version of IE not allowing the server to set a cookie?

RaymondDeCampoa at 2007-7-29 16:53:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...