This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

session management problem with iframes

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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