User (Legacy) Posted October 20, 2004 Report Share Posted October 20, 2004 Hello. I've generated a Flash using a jsp and had no problems. Now, I want to create a Flash using the bit stream method. So, I've done an html file: <html> <head> <title>Flash</title> </head> <body> <OBJECT name="Chart1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#Version=5,0,0,0" WIDTH="450" HEIGHT="280"> <param name="movie" value="xml_flash.jsp"> <EMBED name="Chart1" type="application/x-shockwave-flash" src="xml_flash.jsp" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" WIDTH="450" HEIGHT="280" ></EMBED> </OBJECT> </body> </html> Obviously, the flash is generated by the file xml_flash.jsp, which contains: <%@page import="SoftwareFX.ChartFX.*"%> <%ChartServer chartl = new SoftwareFX.ChartFX.ChartServer(application,request,response);chartl.openData(COD.VALUES,1,100);for(int i=0;i<99;i++){chartl.setValue(0,i,java.lang.Math.random()*80);}FlashWriter w = new FlashWriter();chartl.setOutputWriter(w);chartl.getHtmlTag("450","280","FLASH");%> (everything after the second '<%' is on one line). But it doesn't work. Something must be wrong, but I don't see what. Can you help me please? Thanks. JuJu Link to comment Share on other sites More sharing options...
Software FX Posted October 20, 2004 Report Share Posted October 20, 2004 You have to be very careful in the jsp that is creating the chart. As we state in the documentation, "Please remember there must not be any spaces or carriage returns before the start of the jsp code (<%). If you press [Enter] then a carriage return will be generated in the result of the jsp and the IMG source will not be able to read the image generated by Chart FX for Java. Therefore it is strongly advised that you use a plain text editor when generating these files as many advanced editors may include undesired HTML tags in the resulting file." Furthermore, we have found that some application servers behave a little bit different in this issue. In some cases, even the line break between the first 2 lines will make it fail. But without a detail of the problem there is not much I can do. I'm attaching a set of files that work in all out testing servers, please let me know the results. GA Software FX, Inc. "JuJu" <jujut@free.fr> wrote in message news:4wIRpzqtEHA.3560@webserver3.softwarefx.com... > Hello. > > I've generated a Flash using a jsp and had no problems. > Now, I want to create a Flash using the bit stream method. So, I've done > an html file: > > <html> > <head> > <title>Flash</title> > </head> > <body> > <OBJECT name="Chart1" > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#Version=5,0,0,0" > WIDTH="450" HEIGHT="280"> > <param name="movie" value="xml_flash.jsp"> > <EMBED name="Chart1" type="application/x-shockwave-flash" > src="xml_flash.jsp" > pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" > WIDTH="450" HEIGHT="280" ></EMBED> > </OBJECT> > </body> > </html> > > Obviously, the flash is generated by the file xml_flash.jsp, which > contains: > > <%@page import="SoftwareFX.ChartFX.*"%> > <%ChartServer chartl = new > SoftwareFX.ChartFX.ChartServer(application,request,response);chartl.openData(COD.VALUES,1,100);for(int > i=0;i<99;i++){chartl.setValue(0,i,java.lang.Math.random()*80);}FlashWriter > w = new > FlashWriter();chartl.setOutputWriter(w);chartl.getHtmlTag("450","280","FLASH");%> > > (everything after the second '<%' is on one line). > > But it doesn't work. > Something must be wrong, but I don't see what. > > Can you help me please? > > Thanks. > JuJu Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 20, 2004 Author Report Share Posted October 20, 2004 SoftwareFX Support wrote: > You have to be very careful in the jsp that is creating the chart. As we > state in the documentation, "Please remember there must not be any spaces or > carriage returns before the start of the jsp code (<%). If you press [Enter] > then a carriage return will be generated in the result of the jsp and the > IMG source will not be able to read the image generated by Chart FX for > Java. Therefore it is strongly advised that you use a plain text editor when > generating these files as many advanced editors may include undesired HTML > tags in the resulting file." > > Furthermore, we have found that some application servers behave a little bit > different in this issue. In some cases, even the line break between the > first 2 lines will make it fail. But without a detail of the problem there > is not much I can do. > > I'm attaching a set of files that work in all out testing servers, please > let me know the results. > > GA > Software FX, Inc. > > > "JuJu" <jujut@free.fr> wrote in message > news:4wIRpzqtEHA.3560@webserver3.softwarefx.com... > >>Hello. >> >>I've generated a Flash using a jsp and had no problems. >>Now, I want to create a Flash using the bit stream method. So, I've done >> an html file: >> >><html> >><head> >><title>Flash</title> >></head> >><body> >><OBJECT name="Chart1" >>classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >>codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#Version=5,0,0,0" >> WIDTH="450" HEIGHT="280"> >> <param name="movie" value="xml_flash.jsp"> >> <EMBED name="Chart1" type="application/x-shockwave-flash" >>src="xml_flash.jsp" >>pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" >>WIDTH="450" HEIGHT="280" ></EMBED> >></OBJECT> >></body> >></html> >> >>Obviously, the flash is generated by the file xml_flash.jsp, which >>contains: >> >><%@page import="SoftwareFX.ChartFX.*"%> >><%ChartServer chartl = new >>SoftwareFX.ChartFX.ChartServer(application,request,response);chartl.openData(COD.VALUES,1,100);for(int >>i=0;i<99;i++){chartl.setValue(0,i,java.lang.Math.random()*80);}FlashWriter >>w = new >>FlashWriter();chartl.setOutputWriter(w);chartl.getHtmlTag("450","280","FLASH");%> >> >>(everything after the second '<%' is on one line). >> >>But it doesn't work. >>Something must be wrong, but I don't see what. >> >>Can you help me please? >> >>Thanks. >>JuJu > > > Hello. Thanks for your answer, but the problem was due to a misreading... As a matter of fact, I've used the getHtmlTag function, instead of the getHtmlData one... Everything works fine. Sorry. JuJu Attachments.zip Attachments.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.