The forward tag expects a url that is relative to the ServletContext root - if you
have a web application that you have named myApp and you access it at
http://www.myHost.com/myApp, then the root of the Context is /.
if Hepek is the root of your ServletContext try
<%
String path = "/PdfFile/" + filePath
%>
<jsp:forward page="<%=path%>" />

Tarik Makota wrote:

> Following is structure under Tomcat:
>
> webapps
>     Hepek
>         Examples
>         PdfFile
>
> I have .jsp file under Examples directory in which I perform forward
> to PDF file under PdfFile directory:
> So I am going one level up (to Hepek directory) and then from there to
> PdfFile directory.
>
>     path_to_pdf_file = "..//PdfFile//" + file_name;
>     <jsp:forward page="<%=path_to_pdf_file%>"></jsp:forward>
>
> Forwarding does not work, I get empty page, no error.
>
> However, If I create hyperlink instead of forward for example
> If I replace forward statement with:
> <A HREF="="<%=path_to_pdffile.pdf%>">link</A>
> this link work just fine and it takes me to pdf file in PdfFile directory.
>
> Can anyone shed any light.
>
> Tarik
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--
Erik I Morton
Software Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to