• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp page is not loaded properly until refresh is pressed on to it .  RSS feed

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

We are using Oracle Mapviewer , which will display all our network in form of a Image on to the browser .

The problem is that when the jsp page is called for the first time , it only shows the menu part and all the page is empty .

When Refresh (f5) is pressed it will load all the network and displays it .

This is a serious issue for our application .

If anybody faced this type of issues ,please suggest how can this be eliminated .

Thanks in advnace
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has the request finished? Is there complex JavaScript in the page? What does the source of the page contain? Are there any errors in your logs?
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the logic of loading the map image in your JSP? Is it an < img >, <iframe>, etc? And like Paul mentions, are you making it sure that the response to the request issued for the JSP has completed?

Also, is this map image a static image or is it created at the server based on some dynamic inputs?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:Has the request finished?

Please let me know how can i know whether the request has been completed or not ?

Is there complex JavaScript in the page?

yes there is a lot of javascript coding .

What does the source of the page contain?


It shows the spatial data of oracle in form a image

Are there any errors in your logs?


No errors on to the log files
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the logic of loading the map image in your JSP?


It is an img src

And like Paul mentions, are you making it sure that the response to the request issued for the JSP has completed?



How can i check the above one

Also, is this map image a static image or is it created at the server based on some dynamic inputs?


dynamic one (It takes all the data in database and shows it in form of a image
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Varre wrote:
And like Paul mentions, are you making it sure that the response to the request issued for the JSP has completed?

How can i check the above one

Add an alert to the onLoad event of the <body> tag.
Ravi Kiran Varre wrote:
Also, is this map image a static image or is it created at the server based on some dynamic inputs?

dynamic one (It takes all the data in database and shows it in form of a image

My best guess is that the image has not been completed generated when you refresh the JSP. The alert above should give you an accurate indication when the response has been completely generated. I am not sure but I hope the browser doesn't try and load the image asynchronously.

Another thing you can do is - at the server side print a message to the server console after the image has been completely generated and the response flushed. If the image doesn't appear even after you get the message in the server console/log, then we've got some other problem.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Add an alert to the onLoad event of the <body> tag.


I could not understand how can this will be helpful . If you don't mind can you please explain this
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Varre wrote:I could not understand how can this will be helpful

If the image is not loaded asynchronously by the browser [which I believe it doesn't], then you should see the alert only after your image has been completely loaded.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi , when tested the alert which is on body onload gets displayed everytime (even when the image is loaded or not ) .


But system.out.println() statements which are put afer the image and before the image are not getiing printed .


This is the case right now , what might be the problem ??
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!