tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maya <>
Subject accessing files/dirs.....
Date Tue, 03 Apr 2007 18:24:24 GMT
File dir = new File("C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

         File dir = new File("images")

starting @ root of webapp also doesn't work...

     File dir = new File("/india/delhi/images");

names of directors are good, they are all lowercase...

have conditional to test...

             if (imgsList == null)

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with "http..."?????

is this an access problem?  if so, do I need to ask my webhosting folks? 
  I know this is not a very "kosher" way of doing it, but am running 
this code in a JSP for now (still don't know enough struts and such to 
do this kind of stuff in a stand-alone class..  but of course eventually 
will have to..  all I want to do is count how many images are in 
'images' dir.. that's it..)

thank you...

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message