0
CQ에서 amcharts를 구현하고 있습니다. 로컬 glassfish 서버에서 일시적으로 호스팅하는 서블릿을 호출하여 데이터를 얻습니다. 다음은 내 amchart 컴포넌트 JSP의 코드 스 니펫입니다.CQ 5.6.1에서 플래시 객체 만들기
<%@include file="/libs/foundation/global.jsp"%><%
%><%@page session="false" %><%
%><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test amcharts generation</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="container">
<div id="singlesection" class="norm" >
<div class="norm">
<script type="text/javascript" src="/apps/geometrixx/components/amchart/am/swfobject.js"></script>
<div id="flashcontent"><strong>You need to upgrade your Flash Player</strong></div>
<div id="result"></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("/apps/geometrixx/components/amchart/am/amstock.swf", "amstock", "600", "400", "8", "#FFFFFF");
var uri = "http://localhost:8080/Charts/apps/CreateXMLFileServlet?r="+Math.random()+"&fc=03";
so.addVariable("settings_file", encodeURIComponent(uri));
so.addVariable("chart_id", "amstock");
so.addVariable("key", "106-d0564444fe0a5ce6839d84f70655375c");
so.write("flashcontent");
// ]]>
</script>
</div>
</div>
</div>
</body>
서블릿이 호출되지 않습니다. 브라우저에서 서블릿 URL을 직접 시도하면 응답을받습니다. 제가 여기서 잘못하고있는 것을 제안하십시오. 고맙습니다.
작성한 다른 구성 요소가 성공적으로 호출 되었습니까? Flash 객체는 디버깅을위한 빨간색 청어 일 수 있습니다. [최소한의 완전하고 검증 가능한 예제] (http://stackoverflow.com/help/mcve)를 작성해야합니다. 문제가 발생한 곳을 먼저 추적하기 위해 구성 요소가 'Hello world'를 출력하도록하십시오. – anotherdave