File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to detect a file is existing or not?

 
ziqiang wu
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all: Could you please tell me how my java code detect a file is existing or not???
Thanks!
 
ziqiang wu
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know I can use File file=new File("****.***"); if(file.exists()) do... else do.... but I want to use jsp include tag to detect a file is exist or not. currently, if a file (***.html) exist, then jsp include it and show up, if a file(***.html) does not exist, then jsp include nothing, and no exception. So I want to find some way, if jsp include nothing, then do...something.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic