When running in Tomcat (out of Eclipse w/debugger), how are you supposed to get a .jasper file (say as an InputStream) for JasperFillManager.fillReport() to use? Currently our .jasper files are within /WEB-INF/jasper.
I need a solution that doesn’t break based on where you happen to be running the report from. If it’s being debugged while running Tomcat from Eclipse, System.getProperty("user.dir") returns C:/Eclipse ... but obviously, that path will be different when it’s deployed to a server.
How do you get around this?
I’ve managed to get this working running from tomcat/eclipse by changing the Tomcat launch configuration working directory from within Eclipse. This lets you just pass a relative path to fillReport() in the Java code. But I’ve yet to try testing from within websphere… (something tells me I’ll be cursing IBM again soon).