wood burning stoves 2.0*
The moose likes JSP and the fly likes Regarding refreshing a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Regarding refreshing a JSP page" Watch "Regarding refreshing a JSP page" New topic

Regarding refreshing a JSP page

Sharmeela Manivannan

Joined: Aug 11, 2005
Posts: 1
im designing a shopping cart.in that when add to cart is clicked..if not logged previously..login form is given in javascript window.after the login is successful,the shopping page they are currently in should refreshed..with session value of the user..but the contents of the apge should be retained...
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
From a use-case point of view, generally you would not need to login to add items to your shopping basket - only when you are checking out.

Relying on JavaScript to log people in is a bad idea, for reasons of browser compatabilities and the fact that some people disable JavaScript

Drinking more tea is the key...
Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
If you insist on using javascript, I'd recommend using either hidden iframes or Ajax (preferable, but some compatibility issues) to get data from the server without reloading the entire page. Look in the HTML/Javascript forum for more info.

subject: Regarding refreshing a JSP page
Similar Threads
transactions across jsp pages best practice
WA #1.....word association
How do I find if the current user has logged in or not
how to stop user to acces directly inner page of a website
Shopping carts and logins