Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

don't get latest data from database (JSP / Servlet)

 
schnullerbacke
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I'm writing a little addressbook in JSP with servlets and a mysql database.
The first page (index.jsp) ist a standard jsp page, which gets data from database using a bean. If the sites are fresh published and the Tomcat is restarted, latest data are displayed. But when I write a new data set into the database (using a servlet or direct via mysql console) and call my first page again, without republishing or server restart, the new data are not displayed. Why?

I use eclipse ganymede and tomcat 6.0.18, which I control from eclipse.

Thanks in advance!
 
Arvind Sampath
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try isolating the problem. Did you query the database after your servlet updates it to check if the update was successful immediately?

Are you using any framework for database interaction from your application?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"schnullerbacke", please check your private messages for an important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the NoCacheHeaders entry of the JSP FAQ.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48971
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
"schnullerbacke", please check your private messages for an important administrative matter.


I was just about to say the same! He must have two PMs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic