struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Timm <java_co...@yahoo.com>
Subject File in DB vs. File system part2
Date Sat, 08 Dec 2001 22:40:16 GMT
Hello.  First, thanks for all of the great advice. 
I've decided to store the files in the file system and
have written a little method that creates a sub-folder
based on the month/year that the user registered.  I'm
storing pictures with the same name as the username in
this directory.  The only thing I'm storing in the
database is the file type (gif, jpg).  Another method
takes the username, looks up the sub path (appends it
to a base path read from a config file), grabs the
file type and returns the HTML <src> tag that shows
the pic as either a thumbnail or fullsize.  My next
problem is in updating this picture.  I have an update
page that calls the 'showPic' method so users can see
what pic is current, then allows them to enter a path
to a new pic if they want to change their picture. 
Say I enter a new picture and submit.  The new picture
overwrites the old one, and in the next page (which
shows all the users' properties), I'm calling the same
'showPic' method to show the current pic (along with
other properties).  The picure on the file system HAS
been changed - my problem is that the old pic has been
cached somewhere and is displaying on the properties
page.  If I refresh the page, the new pic is
displayed.  Where is this cached?  How can I force a
reload, or force the page to refresh?  
I'm new to all this, so I welcome comments on my
strategy - I'm aware that it probably isn't the best
solution - I'm on a tight deadline and am more
concerned with getting things working.  This project
is a learning experience.  How can I fix my refresh
problem?  Thanks for your time, Andrew Timm

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message