This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am building a simple web page in JSP with an embedded javaapplet 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 ]