Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
    Bookmark Topic Watch Topic
  • New Topic

session management problem with iframes  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Dear All

This is my first post at the JavaRanch, so my apologies in advance for any learning curve issues, such as posting to the correct topic.

The problem I am encountering is that the JSP rendered in the iframe in the main page of my web app is causing a second session to be created. Once that happens, response.encodeURL() stops working. It does not throw any Exception. It just does not append jsessionid or its value to the URL as expected.

Using an HttpSessionListener I have verified that additional sessions are being created in response to each request to the JSP contained in the iframe. I was surprised that tomcat 5.0 was not able to recognize that the request came from the same user.

At this point I am sbout to write off trying to mix sessions and iframes. My boss want to stick with iframes. If necessary, I can work around not using the session object, even if it means reinventing the wheel -- something I would rather not do.

I spent the last hour reviewing various Java Ranch postings, and a few indicated similar problems, other posting hinted to some dificulties with iframes but no solutions to my particular problem.

My technical environment is:

tomcat 5.0 running on localhost
IntelliJ 5.1
Windows XP Professional
Java 1.5
Internet Explorer 6.0.2

Is there something simple that I am overlooking or should I just forget about trying to mix sessions and iframes?

Thanks in advance.

Sombra Flores
Author and ninkuma
Posts: 66425
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!