File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes HTML hyperlink problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "HTML hyperlink problem" Watch "HTML hyperlink problem" New topic
Author

HTML hyperlink problem

Sridhar Venkataraman
Ranch Hand

Joined: May 22, 2006
Posts: 76
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML hyperlink problem
 
Similar Threads
Help with a program that extracts HTML links
JSP
servlet configuration problem
Error with running batch file from Java class
Is WEB-INF Directory mandatory ?