• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Double Refresh of JSPs

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I got this problem of my web pages refreshing twice on load
When I have set my browser settings for "Check For newer versions of web page... " to Automatically... I do not get the double refresh problem, but When I have my setting to "On every visit to the page" my Jsps load twice(its like another submit happening after the jsp is loaded... and of course I checked... there is no submit happening in the onLoad function)

Any Pointers
Thanks
Pratik Lohia
 
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
How are you determining that the page is double-loading?
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I am able to see the double load happen on slower machines, where the browser response is slow. Whenever a page loads, and the user sees it for a coipla seconds, or moves his mouse to perform any action on the page ... and whoosh.... there goes the page again and refreshes.
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
That's not something I've ever heard of. Are you sure that it's not just the browser acting badly and redrawing the display, and that a separate request is actually being sent? Are you sure that there's no meta tag or Javascript on the page that could be triggering a reload?
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sure theres none.... but if u wud still like to verify
here is the jsp header code



and here is the snippet of the javascript on loadc function.






load function like


None of the functions that get called internally in the javascript on
load function like changeCategoryType have a submit. They just set the value of the select boxes in the jsp

and as i said in my fisrt message, tht by changing some browser settings the double refreesh does get avoided. But I do not wish to change the browser settings as there are other dependencies in the application for the existing browser settings
[ March 05, 2006: Message edited by: Pratik Lohia ]
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator

but if u wud



If you want people to take the time and help you with your problem, perhaps you could show the courtesy to take the time to type out the complete letters in "you" and "would"?
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i did not know all these things matter on the ranch...
i would take care of it in the future...
however takin into consideration the way the world wide web functions... it is also about saving time (productive time for every person on the internet) and thats why those shortcuts were there(a lot of u's for you's and wud for would do save some time...dont they?;-))) and i assume that nobody would find them rude or incourtous as they are the lingo of the web...
anyways...sir.. .your point is taken and will be adhered to.

and i hope that my question still remains the active thread... and that there is some help and answer for it

[ March 05, 2006: Message edited by: Pratik Lohia ]
[ March 05, 2006: Message edited by: Pratik Lohia ]
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator

Originally posted by Pratik Lohia:
i did not know all these things matter on the ranch...



They do. Please read this.

it is also about saving time (productive time for every person on the internet)



No, lazy typing like that is about saving your time at the expense of people who have to take the time to decipher the gibberish.

and i assume that nobody would find them rude or incourtous



Incorrect. I find it highly rude and discourteous. It's one thing to make such shortcuts in a chat room or when text messaging on a cell phone, but in a venue such as this where you compose the messages before posting them, it's just lazy and discourteous.

your point is taken and will be adhered to.



Thank you.
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
The JSP source is considerably less helpful and interresting than would be the composed HTML sent to the browser. Why not post that?

Also, have you observed this in more than one browser?

Another hint: clicking the 'disable smilies' checkbox when posting code is always a good idea.
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried it on other browsers like opera and mozilla. it works fine there
[ March 06, 2006: Message edited by: Pratik Lohia ]
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
So the problem is only observed in IE? Makes me wonder if it's just the browser flickering the display for some reason.

Have you determined whether this could be the case? Or are you certain that two requests are being made to the server?
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am certain it is not browser flickering... because if that were the case the changing of settings would not have stopped it from happening. Secondly, I the case of double submit also has been investigated. Even that does not seem to be the issue. There are no double requests being submitted at the browser
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
OK, then it's clearly a browser issue. At this point I'm moving this over to HTML forum. I'd suggest that you post a reply showing the HTML generated for your page (not the JSP source) to see if anyone there can tell what's making IE act so weird.
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone who knows wats wrong?
 
Bear Bibeault
Sheriff
Posts: 67752
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:
  • Quote
  • Report post to moderator
No one has a crystal ball to my knowledge. Please post the generated HTML as I requested.
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem was actually with the way the select boxes were populated.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic