[jboss-user] [Beginners Corner] - directories and files write and read
moa3333
do-not-reply at jboss.com
Wed Apr 25 09:30:50 EDT 2007
I am developping with ejbca and Jasperreports. I nead a temporary folder where i can generate some images and html files and then relod them to the user on the screen.
I have tried various paths with no rules. I already checked all the files are well deployed by JBoss inside a directory like this:
/opt/jboss/server/default/tmp/deploy/tmp38980ejbca.ear-contents/adminweb-exp.war/
inside there is a WEB-INF directory
I would like to put my files into WEB-INF/reports/ or something at runtime.
This is my code for reading a file:
jasperReport = JasperCompileManager.compileReport("/opt/ejbca_CVS/ejbca_ECLIPSE/src/adminweb/WEB-INF/reports/charts.jrxml");
it works only with a complete path to a stable directory for now.
This is supposed to generate a html file and all the images:
JasperExportManager.exportReportToHtmlFile(jasperPrint,"../WEB-INF/reports/charts.html");
This one uses relative paths. I have errors on this one like this:
net.sf.jasperreports.engine.JRException: Error creating to file writer : charts
The file from where i am running this is located at:
/ejbca/adminweb/log/viewcharts.jsp
the .. should put me to /ejbca/adminweb/
Well, it does not work!
Does anyone know how to obtain a good directory and most of all how to configure JBoss in order to have write aces to that directory?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040588#4040588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040588
More information about the jboss-user
mailing list