tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David kerber <dcker...@verizon.net>
Subject Re: Cannot create a link to a file - suspecting tomcat is the issue
Date Thu, 10 Mar 2011 15:25:18 GMT
On 3/10/2011 10:21 AM, John C wrote:
>
> In case I did not explain myself well. I am trying to create a link to a file in a webpage.
The link works fine using Apache + Tomcat if the file and link are both relative. This means
that the html file containing the link to the text file is located in the same directory as
the file itself. However I would like to link to absolute files anywhere on the system where
the Apache + Tomcat server is hosted. In this case I am running on local host and using the
absolute link to the file (file:///C:/Users/OEM/Desktop/testa.txt). Unfortunately this doesn't
work. Any idea what I am doing wrong?
>
>> From: jac_legend_sas@hotmail.com
>> To: users@tomcat.apache.org
>> Subject: Cannot create a link to a file - suspecting tomcat is the issue
>> Date: Fri, 11 Mar 2011 04:07:47 +1300
>>
>>
>> I am trying to create a link to a file in my webpage. The anchors href for the link
is "file:///C:/Users/OEM/Desktop/testa.txt". When I run my webpage from file I can click the
link (file:///C:/Users/OEM/Documents/NetBeansProjects/WebApp/web/main.htm). However when I
run my webpage using Apache Server and Tomcat I cannot click the link (http://localhost:8080/WebApp/main.htm).
What I am trying to achieve is to be able to create a link to a file located anywhere on the
server. Since I am using localhost, I would like to point to this file (file:///C:/Users/OEM/Desktop/testa.txt).
How do I do this? Does the file have to be relative to Apache Server?
>> Thanks 		 	   		
    		 	   		
I'll bet that file doesn't exist on the user's machine, right?  You need 
to have a link that the users' browsers can resolve, so it will need to 
be something in the web server's domain.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message