Hi again,

This is an addendum to my earlier post, which highlights the linking problem
mentioned earlier and introduces another one (sigh).

The directory structure of my web application is the following:

GSDC5P1 (root)
---------------
docs | images | lib | mindmaps
index.html
-----------------------
docs > GSDC_PolicyManual.mht

The index.html file is in the root and from this file, I want to link to the
GSDC_PolicyManual.mht present under the directory docs.

In my index.html file, I tried linking to this file in six different ways
(NOTE: In some of these links, I tried linking to a specific sub-section of
the MIME HTML [.mht] document by using the anchors present, because that is
my ultimate aim in creating these links). 

In particular, I tried using a relative path, absolute path and the full web
container path (localhost and my workstation IP address, considering I'm
running Tomcat in my own workstation) to link to the file.

The HTML code for the links is below:
docs/GSDC_PolicyManual.mht  Test 1  
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht  Test 2  
docs/GSDC_PolicyManual.mht#_Toc175474678  Test 3  
C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht#_Toc175474678
 
Test 4  
http://localhost:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678  Test
5  
http://10.194.118.58:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 
Test 6  

The results are that the relative paths and http:// paths work. But when the
.mht file opens up, it throws the following error:

MIME-Version: 1.0 Content-Type: multipart/related;
boundary="----=_NextPart_01C8B51A.46DAF130" This document is a Single File
Web Page, also known as a Web Archive file. If you are seeing this message,
your browser or editor doesn't support Web Archive files. Please download a
browser that supports Web Archive, such as Microsoft Internet Explorer.
------=_NextPart_01C8B51A.46DAF130 Content-Location:
file:///C:/E048E08C/GSDC_PolicyManual.htm Content-Transfer-Encoding:
quoted-printable Content-Type: text/html; charset="us-ascii" 

I cannot make much sense of this because when I double click on the .mht
file and open it in Internet Explorer (my workstation has version 6
installed), the document shows up fine.

Again, the absolute links to this document don't work at all. No errors, no
messages of the kind above.

I'm really keen to get to the bottom of this and somehow make the .mht file
work, while keeping in mind that it may be on a remote server (so I must be
able to link to it outside of my webapps folder).

Hope that throws much more light on the situation.





thunderhead wrote:
> 
> I understand what you're getting at. I am running a local instance of
> Tomcat, which means that both the client and the server are in my
> workstation. So shouldn't the local linkages work then?
> 
> Now, bringing the files into the webapps folder is a convenient solution.
> But the issue is that this web application is ultimately going to be
> deployed on a production/test server, and the application has to refer to
> the direct path of files lying on a remote server elsewhere.
> 
> Again, http:// paths work, but local paths don't even if they refer to my
> own workstation (the one in which I am running Tomcat).
> 
> One thing I must point out is that I don't have a configuration file in my
> web application's folder (currently it does not use any JSP, and the only
> Java involved is in an applet (.jar) which is embedded into a HTML
> document). Should I make a configuration file? If so, what must I put into
> it such that these links work?
> 
> Thanks for looking into this.
> 
> 
> 
> 
> Caldarale, Charles R wrote:
>> 
>>> From: thunderhead [mailto:[EMAIL PROTECTED] 
>>> Subject: HTML hyperlink problem in Apache Tomcat 5.5
>>> 
>>> I tried linking some local files on my workstation for 
>>> testing purposes.
>> 
>> You can't do that.  Each link is evaluated in the environment of the
>> *client* (browser, in your case).  Unless the files are located on the
>> client system, they won't be found.  Put the files inside the webapp and
>> access them via the proper webapp-relative references.
>> 
>>  - Chuck
>> 
>> 
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/HTML-hyperlink-problem-in-Apache-Tomcat-5.5-tp17332016p17332804.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to