Hi,

I had been using the following code to dynamically lookup files in my Tapestry [5.1.0.5] applications context:

        private Logger log;
        private Context cimpl;
        private JasperService js;

        
        public ReportServiceImpl(Logger log, Context cimpl, JasperService js){
                this.log = log;
                this.cimpl = cimpl;
                this.js = js;
        }

        ...

        Resource resc = new ContextResource(cimpl, 
"src/main/webapp/reports/"+contextDir+"/"+reportTitle+".xml");


which worked fine when running via the maven jetty-plugin, probably in part since this is a direct path from the execution.

I've deployed using Jetty 6 stand-alone and now that I'm executing from a WAR file with jetty, it is not resolving the path correctly. It seems to load everything else from the context fine, is it not supposed to be able to reference these ContextResource files from within the WAR file? The path it is resolving is

Caused by: java.lang.RuntimeException: ReportSource 
'/opt/jetty-6.1.26/src/main/webapp/reports/cai/report.xml' is missing!

Where you can see that it just plugs in /opt/jetty-6.1.26/ in front of the path. Maybe I'm not using the right approach, is there anyway it's going to be able to access these files from the WAR?

Thanks,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to