Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML hyperlink problem

 
Sridhar Venkataraman
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

I am building a simple web page in JSP with an embedded java applet that runs an application (the page does not contain any JSP code *yet*, but is saved as a JSP file).

I am using Apache Tomcat 5.5 to render the page. On this page, I tried linking some local files on my workstation for testing purposes. Some samples are shown below:

<a href="C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.5\webapps\GSDCRBTMindMapTest\GSDC_PolicyManual.mht"> Test </a>
<a href="C:\gsdcrbtframework.jpg"> Test 2 </a>

When I access the page through Tomcat by typing localhost:8080/<appname> into my browser, these links don't work. Clicking on them does absolutely nothing.

I then created a new HTML file in my application directory just to make sure it wasn't a problem with JSP and put the same links there. They work when I double click the file (access it locally), while they don't do anything again if I access the page using the Tomcat port (i.e. localhost:8080/<appname>).

What is going on here? The links don't work even if the path is relative to the application directory. The embedded java applet works fine, but it has an application with hyperlinks. And these hyperlinks too don't work if I try to link them to a file present in my hard drive (they work when the links begin with a http://).

Appreciate your help on this. Will be glad to provide more information if needed.

[ May 14, 2008: Message edited by: Sridhar Venkataraman ]
[ May 14, 2008: Message edited by: Sridhar Venkataraman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic