Jump to content

about the flash demo!


ccycc

Recommended Posts

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:08

Post edited by: ccycc, at: 2008/06/04 18:11

Link to comment
Share on other sites

  • 1 month later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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...