This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cookies problem

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to display a popup screen which gets all the details of the caller from a servlet.This page displays well.But when i click the dispose button in this popup page ,it should go to an refresh screen.But when i dispose,The details which i got in popup screen are saved in the browser and i am unable to proceed further for another popup screen for next caller's details.my code follows:

The code for dispose is:

How to solve this?please assist me.Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would do a view-source on the popup screen - just glancing at the code I dont see where you close the <form tag.

The details which i got in popup screen are saved in the browser


How? Why are you sure that this is happening?

Bill
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

How? Why are you sure that this is happening?

I am using get method in all the servlets and jsp.After displaying the popup screen,when i dispose,it goes to the next page .But in that page browser,I can able to see the details listed in the popup screen.
 
nick sharma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey do you refresh to the same dispose page or do you go back to the page where you enter the username??
the thing is you have used sessions and the username is stored in the session,everytime you execute the page,username gets taken from session,so the same users details are being retrieved.
you did not close the form tag in the retrival page.
This is my observation,kindly tell me if i am wrong.
tc.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The details which i got in popup screen are saved in the browser


Read that again - how are you sure the details are saved in the browser? What is it "in the browser" that saves the details?

You may be able to save details from a submitted form on the server side - don't confuse that with the state of the client side.

Bill
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your replies.my fault is i am submitting all the details to the next page.instead of using

RequestDispatcher rd = getServletContext().getRequestDispatcher("/Crmpopup");
rd.forward(request, response);

I have used send redirect.now my problem is solved and it works fine.

Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic