aspose file tools*
The moose likes JSP and the fly likes don't get latest data from database (JSP / Servlet) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "don Watch "don New topic
Author

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

schnullerbacke
Greenhorn

Joined: Nov 17, 2008
Posts: 4
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!


feel the challenge!
Arvind Sampath
Ranch Hand

Joined: May 11, 2005
Posts: 144
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

Joined: Jan 10, 2002
Posts: 61413
    
  67

"schnullerbacke", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

See the NoCacheHeaders entry of the JSP FAQ.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: don't get latest data from database (JSP / Servlet)