Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to check file

 
amit sanghavi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest using the java.io classes to do this. For example:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic