Getting Absolute path

how to manipulate or to change the folowing absoulute path to worrk in web browserString p = C:\Program Files\Tomcat\webapps\myApp\tempData\regards
[175 byte] By [the_Orienta] at [2007-11-27 0:27:40]
# 1
any help
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 2
It will be something like http://localhost:8080/myApp/tempData
Michael.Nazarov@sun.coma at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 3
String p1="C://Program Files/Tomcat/webapps/maApp/tempData/";works not the same error
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 4
any help or tip
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 5
wenn I use relative path it works fine local on my home pc but it works not by my web hoster therefor I will use absolute pathplease I need urgent help thanks
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 6

This sounds more like a web application problem than a Java problem. In general, most if not all web servers will ONLY serve files that exist in a relative path below the root directory of the web service. This is for security reasons so that outsiders can't just wander around on the server's hard disk at will.

HOWEVER, some *do* allow access to absolute paths IFF the access rights to those paths are set properly for the user the web server runs as.

I would suggest you post your question on a forum oriented toward the web server you are using, or contact your web host's support department (not usually fruitful for these types of problems).

BiFla at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 7

the problem is not so as you did understand

Problem description

I have web application clients users upload images I read the images from the request Object and I save it in a folder "tempData" in the web application

myApp/ tempData

after upload user will see their uploaded images to check

I try to display the uploaded images in browser using relative path

notice local on my home pc works fine

but by my web hoster images can not be displayed an I am sure it is a path problem

meine question how can I use the absoulute path in javascript to find

the uploaded images

thanks

the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 8
How are you deploying your web application to the host?PS.
puckstopper31a at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 9
I upload the files via FTP SmartFTP
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 10
is that what you want to know ?
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 11
Sort of. What do you upload? Is it by chance a WAR file or EAR file?PS.
puckstopper31a at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 12
norI upload the complete application as normal files and folders
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 13
So you're uploading an exploded directory structure to the host server. Does that exploded structure include the folder where you're putting the image files later?PS.
puckstopper31a at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 14
yes absoulutly sure
the_Orienta at 2007-7-11 22:27:40 > top of Java-index,Java Essentials,Java Programming...
# 15
any halp or tip I can not understand this problem
the_Orienta at 2007-7-21 19:44:32 > top of Java-index,Java Essentials,Java Programming...