jQuery in Action, 3rd edition
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 Java Interview Guide this week in the Jobs Discussion 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 java.io classes to do this. For example:

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: how to check file
It's not a secret anymore!