Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes how to check file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to check file" Watch "how to check file" New topic

how to check file

amit sanghavi

Joined: Jul 31, 2006
Posts: 1
Hi all,
I am using struts and i am generating file in one particular folder on server. I want functionality that if user selects criteria and clicks on submit button report file should open. I want that if report file is already created on server (I know what file name to look for in server as if first time user selects date 01/31/2006 file generated is reportname_01/30/2006 ) So i have what file to look for in server, If file is there on server i want that it directly opens that file no need to create file again on server. I want to know how to check that this file is present on server or not. If file is on server i want that my query doesnt get fired again and i will directly open that file some what Caching. So before query i want to write checking condition. Please guide me how to check that file is there on server or not.

Its very urgent
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest using the classes to do this. For example:

Consultant, Sima Solutions
I agree. Here's the link:
subject: how to check file
jQuery in Action, 3rd edition