• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Error loading jsp after submission of data in Dbs.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone please suggest me how to reload a JSP page when user updates any value in the database from the screen?

Actually when user changes any value in the JSP it is being updated in the database but when the  JSP reloads it is getting half.

Thank you.
 
Saloon Keeper
Posts: 28325
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Palak!

The first thing to realize is that JSPs are not like time-sharing terminal displays. The only way to get a JSP to update is if the client sends a new request to the server so that the server can send back a new JSP (or whatever).

You can get around that by putting an auto-refresh option in the HTML that your JSP generates. In ancient times, it was common to use a special META tag to do that. These days we often use AJAX, since that allows updating only part of a page instead of replacing the whole page on the client side.

HTTP servers likewise don't run "programs". Instead they provide services that are run when a request comes in and those services must then provide the response back to the client. So there's nothing to sit around and get updated from the database. Instead the request processor has to read from the database on each request.

In JEE, reqest processors are servlets. For JSPs, the JSP compiler generates a servlet by turning the JSP source into Java code, then compiling the Java code into a class. That's all automatically done for you,
 
Stop it! You're embarassing me! And you are embarrassing this 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