This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTML hyperlink problem  RSS feed

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
Boost this thread!