Jump to content

Relative Path

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Goodluck

Goodluck

    Newbie

  • Members
  • PipPip
  • 16 posts
Hi,

I am developing an application to generate jasper report.

Directory Structure is as follows:
Page1.jsp: D:\Programs\Java\JasperReports\EmployeeReport\web\
employeeReport.jrxml: D:\Programs\Java\JasperReports\EmployeeReport\web\WEB-INF\reports

I have used following statements in the code:



    

        String source = "WEB-INF/reports/employeeReport.jrxml";

        String destination = "WEB-INF/reports/employeeReport.pdf";


    

But it's not working and gives FileNotFoundException. Please help.
Thanks.

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Is there a space in front of WEB because you have one in the listing:

D:\Programs\Java\JasperReports\EmployeeReport\web\ WEB-INF\reports

#3
Goodluck

Goodluck

    Newbie

  • Members
  • PipPip
  • 16 posts
Hi,
Thanks for reply. But there is no space in front of WEB.

#4
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
There is nothing apparently wrong with your code. However, as Jordan pointed out, when the compiler runs, it is appending a space after \web\ which to me looks like a configuration error.