• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to detect a file is existing or not?

 
ziqiang wu
Greenhorn
Posts: 25
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic