I have a 'Java WEB' application where I am using a function that opens the .pdf file I determine, however it only opens .pdf that are in the same folder where my project is saved, I have already tried to change my String
variable that calls the .pdf file and put the Access path, for example, " C: \ test.pdf " but it never finds the file if I put the path together, is it possible to change the access path of the files?
<%
String arquivo = "";
String i = "";
try {
if (request.getParameter("nomeArq").contains("null")){
arquivo = request.getAttribute("nomeArquivo").toString();
}else{
arquivo = request.getParameter("nomeArq");
}
} catch (Exception e) {
arquivo = request.getAttribute("nomeArquivo").toString();
}
try {
i = request.getParameter("numeroPag").toString();
} catch (Exception a) {
i = request.getAttribute("pagina").toString();
}
%>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script><scripttype="text/javascript">
$(function () {
window.onload = function abrirPdf() {
var iframe = $("#LoteSlips");
iframe.attr("src", '<%=arquivo%>_ERRO.pdf#zoom=200&page=<%=i%>');
};
});
</script>