• Post Reply 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

session problem in one of the jsp

Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear java guru's
I have got jsp page A.jsp.User select few option and this jsp calls
B.servlet this takes user input and pass to
C.bean which returns vector to B.servlet
This servlet put vector in session and dispatch to new jsp
D.jsp which calls
E.jsp in it for Image generation.
This E.jsp retrieve vector from session and generate a image and reurn to D.jsp
Now my problem is that session in B.servlet and D.jsp are same but a new session in created in E.jsp so image is null as it could get data from vector which is null.
I put System.out.println(session.getId()) in each servlet and jsp so to get thier ID's.
This is working fine in my system with Tomcat 3.2 but on web the new session is created for E.jsp
I am calling E.jsp like this
<img src=<%=response.encodeURL("/iscap/report/jspChart.jsp")%> alt="generation image" width="400" height="350" border="1">
I am making page session=true in each jsp and also puttting request.getSession(false);
but still E.jsp is getting new session.I tried eliminating each one and made all combination that could be possible but not effect.
How Can I solve this problem on the web where I have to load this?
Do I have to make setting in context .
payal sharma
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Presumably E.jsp is not getting the cookie that the other jsp are seeing - this is likely because the jsp are in different applications as far as the server URL is concerned.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic