• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Refresh a folder

 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to refresh a folder or the whole project using Java/Spring. When i do a file upload and want to display the tree list, the file gets uploaded and when i try to display it, the file isn't displaying. But once i refresh the folder manually its just displaying. Please help me guys.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where's the tree list/folder/project you want to refresh?

Are you talking about the operating system file explorer? your IDE? an application you've developed?

I assume you're talking about the operating system file explorer - there probably isn't a way to do this through Java... the actual file/directory is being created, it's just the file explorer view that's not updating to show it.

What OS are you using? If I search Google for "Windows file explorer doesn't refresh when new file" most of the top results are for some issues with Windows 7.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the project file directory is what i want to refresh.
Dir structure is

PRJ1
--WebContent
--WEB-INF
--images
--src
--package root

Now i need to refresh the images folder so that it'll display the uploaded image in the JSP Page. I want to do it programmatic-ally using Java.

Is it possible to do so?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no way to "refresh" the file system... this is just an artifact of windows explorer. Either a file exists or it doesn't, it's not like you upload/copy/create a file and it doesn't exist until you refresh the directory. How is your JSP getting the file to show?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this thread is a little old but I had a similar problem and putting Thread.sleep(2000); right after the update fixed the problem.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I too have the same requirement to upload a file, from which a graph will be generated(garph image will be saved in web content/image folder) and I need to display the image to user.

My problem is that for different files the graphs are generating and everything is working fine locally. But when I try using IP address, the image is not displaying (X mark displaying). When I refresh the image folder then the image is getting displayed.

Thanks in advance,
Geeta
 
Geeta Puttappanavar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any of you help me please?
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic