This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes session tracking problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "session tracking problem" Watch "session tracking problem" New topic

session tracking problem

Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi. I can't perform session tracking, I cannot use JavaBean in the propagated JSP. When I create bean in the JSP which point at another JSP, the bean created in the first one under session scope, is perfectly extracted in the second JSP.

But, when I initialize bean from JSP, and go to the servlet (just to redirect to anothrt JSP page), the redirected page says that bean is null! It has a bean under session scope (regarding that no new bean is instantiated cause body of the

the servlet Checker, has code :

and the display.jsp

And I get that value of name and lastname are null!!!
Totally confusing...Does anyone have a clue?
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2068
Since you are forwarding (rd.forward) to somewhere still inside your application, and not using response.sendRedirect(), can you try encodeUrl instead of encodeRedirectUrl? Let us know.
Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
No it wont.
I try with RequestDispatcher - encodeURL()
then I try with redirecting res.sendRedirect(path) -encodeRedirectURL()
and it neither wont. I don't understand, how could I track then session if I can't by these two ways???
Don't get me started about those stupid light bulbs.
subject: session tracking problem
It's not a secret anymore!