•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 455,982 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,776 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 749 | Replies: 1
![]() |
•
•
Join Date: Dec 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Dear hidash_in :
I'm a beginner of Jsp ,Tomcat and Mysql like you,my good friend.After I saw your problem,I looked up my references and I found the answer to your question.
If you are open the local file without the tomcat server,for example C:\1.txt,it can be opened.But you started up your tomcat server,the hyperlink in you jsp file must be the path under your tomcat server,for example,http://localhost/blogsystem/1.txt,it can be opened successfully.
So you can write link this:
<%@ page contentType="text/html;charset=GB2312"%>
<%@ page import="java.io.*"%>
<HTML>
<HEAD><TITLE></TITLE>
</HEAD>
<BODY>
<a href="http://localhost/blogsystem/1.txt">1.txt</a>
</BODY>
</HTML>
I'm a beginner of Jsp ,Tomcat and Mysql like you,my good friend.After I saw your problem,I looked up my references and I found the answer to your question.
If you are open the local file without the tomcat server,for example C:\1.txt,it can be opened.But you started up your tomcat server,the hyperlink in you jsp file must be the path under your tomcat server,for example,http://localhost/blogsystem/1.txt,it can be opened successfully.
So you can write link this:
<%@ page contentType="text/html;charset=GB2312"%>
<%@ page import="java.io.*"%>
<HTML>
<HEAD><TITLE></TITLE>
</HEAD>
<BODY>
<a href="http://localhost/blogsystem/1.txt">1.txt</a>
</BODY>
</HTML>
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Updating functionality
- Next Thread: dynamic treeview


Linear Mode