i am using tomcat server to executing the jsp files. my task is to open an application while clicking the hyperlink it throws an popup error msa Access is Denied.
and also i used the path of a file in href it also not opening a file.
give me a solution pls.

9 Years
Discussion Span
Last Post by jspEthusiast

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.*"%>
<a href="http://localhost/blogsystem/1.txt">1.txt</a>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.