Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 18th, 2001, 12:23 PM
ecastanedo ecastanedo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Los Angeles, California
Posts: 102 ecastanedo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 10 sec
Reputation Power: 14
Exclamation File Existence

I want to create a serlvet which checks for the existence of a JSP file. I am kind of new to JSP/Servlet, so I don't know if I am doing it correctly. This is the code I have to run this check:

public boolean isURLValid(String area, String section, String page){

File areaFile = new File("/repositorium/jsp/" + area + "/");
File sectionFile = new File("/repositorium/jsp/" + area + "/" + section + ".jsp");
File pageFile = new File("/repositorium/jsp/" + area + "/" + page + ".jsp");

if (areaFile.isDirectory() == true && sectionFile.isFile() == true && pageFile.isFile() == true){
return true;
} else {
return false;
}
}

This does not work for me. I am trying to check for the existence of this file using an absolute path, starting from the application's root, called 'repositorium'.

Can someone give me some feedback on this?

Thanks in Advance!
__________________
Edgar Castanedo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > File Existence

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap