ccycc Posted June 5, 2008 Share Posted June 5, 2008 it's great.Today,I have been integrated into a project. but I wasted a long time in a matter: i copy the .swf to /report dir,Forgot modified the FlashVars="jrpxml=servlets/xml?" to FlashVars="jrpxml=/servlets/xml?",so always failed. don't make the same mistake.:evil: Post edited by: ccycc, at: 2008/06/04 18:08Post edited by: ccycc, at: 2008/06/04 18:11 Link to comment Share on other sites More sharing options...
rajil Posted July 12, 2008 Share Posted July 12, 2008 Can you tell me what should i set in FlashVars. I have following directory structure. Tomcat||-webapps | | -<project root dir> | | jasperreports-flash-3.0.0.swf | | -jspfiles(folder) | | - report.jsp I put .swf file in root folder of my apps.__________________________________________________report.jsp file <% JasperPrint jp=(JasperPrint)request.getSession().getAttribute(BaseHttpServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE) ; out.print("<br> total pages :"+jp.getPages().size());%> <object width="550" height="400"> <param name="movie" value="jasperreports-flash-3.0.0.swf"/> <embed src="jasperreports-flash-3.0.0.swf" FlashVars="jrpxml=servlets/xml?" width="550" height="400"> </embed></object>__________________________________________________ report.jsp show me number of pages but flash viewer remain blank. Link to comment Share on other sites More sharing options...
rajil Posted July 15, 2008 Share Posted July 15, 2008 Ok I solve problem. and I don't required to put extra / in jrxml.FlashVars="jrpxml=servlets/xml?" this will work. I forget to add following lines in my web.xml file <servlet> <servlet-name>XmlServlet</servlet-name><servlet-class>net.sf.jasperreports.j2ee.servlets.XmlServlet</servlet-class></servlet> <servlet-mapping> <servlet-name>XmlServlet</servlet-name> <url-pattern>/servlets/xml</url-pattern></servlet-mapping> :P Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now