Jump to content
We've recently updated our Privacy Statement, available here ×

How to read .jasper file in the updated versions with relative path.


hesharma

Recommended Posts

Hi Team,

      We are using Japser 4.7.0 for the reports. There we are reading the .japser file using

jasperReport = (JasperReport) JRLoader.loadObjectFromLocation(path);

path is the string of the  .jasper file (a relative path  from "com/abc/reports/jasper/relative_path_of_file.jasper")

This was working perfectly.

Now we are upgrading to the Jasper 5.6.0 for the reports, but here (JasperReport) JRLoader.loadObjectFromLocation(path) 

mathod has been removed. Can you suggest how can I read this file using the relative path. As when the war is deployed on the server path to the file got changed.

 As we tried (JasperReport) JRLoader.loadObject(File file)

but this also requires the Absolute path to get the File Object.

Thanks

Hemraj Sharma

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...