Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Loading.gif when page not Displayed error or white screen while JSP page fetches information

 
Sankalp Dam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application that invokes the seedata.JSP page passing Certain parameter.As soon as the JSP page is invoked, it invokes a servlet which then in turn calls a webservices and queries serul based on the parameter.The results are then passed to the JSP page via same servlet which dispalys it to the user.

Now the problem is as soon as the seedata.jsp is invoked, sometimes Page Cannot be displayed error or sometime a white page is displayed until the JSP page is ready to display the information.This error or sumtimes white screenis replaced with JSP page only when it ahs got all the data, it has to show.This is a big Showstopper.

How do i resolve this.How to show a loading GIF when all this process is happening and hide it as soon as seedata.jsp page is ready with its data.I came to know about AJAX but I dont have idea how and where to write it. KINDLY HELP WITH ANY SUCH CODE
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you calling a servlet in the JSP? That's completely backwards. A servlet controller should gather all the information needed for the display before forwarding to the JSP.
 
Sankalp Dam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry.I would Just like to correct.I am calling a Java Class instead Of a servlet from the JSP page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic