hi frndz
I am new to j2me...and i m writing a code which will download an image file from a web server.. i am using tomcat 4.1 and i am keeping the image in the ROOT folder..but the main problem is with the url...i m giving it like this
http:\\127.0.0.1.\C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\ROOT\255.jpg,but its not working..can u plz tell me what's wrong???
(Aside of the fact that your http: slashes are going in the wrong direction (should be
http://) and the fact that you have a . after your last IP octet (it should not be .1))You are using Apache, and combining the url with the absolute file path.
Apache sets its root folder to be
http://127.0.0.1/ . The absolute path(C:/Program Files/Apache/Tomcat/webapps) is not necessary, and is only for the localmachine, not for http service. Try it, I'm pretty sure one of these two will work:
http://127.0.0.1/255.jpg http://127.0.0.1/ROOT/255.jpg (I will be very surprised if this is the one that works, the first one should be it)