Link to a Java file does not load the file as text/plain |
Link to a Java file does not load the file as text/plain |
gorokhmn |
Dec 11 2007, 10:22 AM
Post
#1
|
Group: Members Posts: 2 Joined: 11-December 07 Member No.: 4,516 |
I have a link in my web page:
<a href="Test.java" target="_blank">...</a> The problem: the file is displayed as html page without newlines. The following link works but I do not like file renaming: <a href="Test.java.txt" target="_blank"> The following attempts fail to render file as a plain text: <a href="Test.java" target="_blank" type="text/plain"> <a href="Test.java?content-type=text/plain" target="_blank"> The problem is reproduced on Firefox v2 and IE v6. Testing on local machine displays Java file as a plain text correctly. Uploading Java file to a server in "text" or "binary" mode does not make any difference. What else to try? Any ideas? |
Darin McGrew |
Dec 11 2007, 03:03 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
What content type is the server configured to send for *.java files?
|
gorokhmn |
Dec 11 2007, 04:11 PM
Post
#3
|
Group: Members Posts: 2 Joined: 11-December 07 Member No.: 4,516 |
I do not have access to the server because it is my web hosting company server. BTW, I found that their CGI-BIN works for me.
Could you explain why it works? Thanks! |
Darin McGrew |
Dec 11 2007, 04:16 PM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Please see the FAQ entry Why did my link to a ... file download a bunch of characters instead?
|
Lo-Fi Version | Time is now: 20th May 2024 - 08:54 AM |