HTTP Status 404 - /sample/sample-debug/sample.html

解决方案 »

  1.   

    檢查你服務器的端口和.mxml的路徑
      

  2.   

    不知道怎么配这个呀!那个swf文件可以运行,而且还没有错误!
      

  3.   

    java 直接调用的是mxml编译后的文件(html),将html改为jsp,在jsp页面中直接调用swf文件,例如下面是我项目中用到的:<%@ page language="java" import="com.index.util.*" pageEncoding="utf-8"%>
    <%@ page import="java.util.*" %>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    String fileName = request.getParameter("fileName");
    Properties p = new Properties();
    p.load(CreatTable.class
    .getResourceAsStream("/com/index/util/ReportModel.properties"));
    String reportpath = p.getProperty("reportpath").toString();
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html lang="en"><!-- 
    Smart developers always View Source. This application was built using Adobe Flex, an open source framework
    for building rich Internet applications that get delivered via the
    Flash Player or to desktops via Adobe AIR. Learn more about Flex at http://flex.org 
    // --><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><!--  BEGIN Browser History required section -->
    <link rel="stylesheet" type="text/css" href="history/history.css" />
    <!--  END Browser History required section --><title></title>
    <script src="AC_OETags.js" language="javascript"></script><!--  BEGIN Browser History required section -->
    <script src="history/history.js" language="javascript"></script>
    <!--  END Browser History required section --><style>
    body { margin: 0px; overflow:hidden }
    </style>
    <script language="JavaScript" type="text/javascript">
    <!--
    // -----------------------------------------------------------------------------
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Minor version of Flash required
    var requiredRevision = 28;
    // -----------------------------------------------------------------------------
    // -->
    </script>
    </head><body scroll="no">
    <script language="JavaScript" type="text/javascript">
    <!--
    // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
    var hasProductInstall = DetectFlashVer(6, 0, 65);// Version check based upon the values defined in globals
    var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);if ( hasProductInstall && !hasRequestedVersion ) {
    // DO NOT MODIFY THE FOLLOWING FOUR LINES
    // Location visited after installation is complete if installation is required
    var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
    var MMredirectURL = window.location;
        document.title = document.title.slice(0, 47) + " - Flash Player Installation";
        var MMdoctitle = document.title; AC_FL_RunContent(
    "src", "playerProductInstall",
    "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
    "width", "100%",
    "height", "100%",
    "align", "middle",
    "id", "flexpaper",
    "quality", "high",
    "bgcolor", "#869ca7",
    "name", "flexpaper",
    "allowScriptAccess","sameDomain",
    "type", "application/x-shockwave-flash",
    "pluginspage", "http://www.adobe.com/go/getflashplayer",
    "FlashVars", "FileName=<%=reportpath%>/report/<%=fileName%>/ALL(<%=fileName%>).swf");
    } else if (hasRequestedVersion) {
    // if we've detected an acceptable version
    // embed the Flash Content SWF when all tests are passed
    AC_FL_RunContent(
    "src", "flexpaper",
    "width", "100%",
    "height", "100%",
    "align", "middle",
    "id", "flexpaper",
    "quality", "high",
    "bgcolor", "#869ca7",
    "name", "flexpaper",
    "allowScriptAccess","sameDomain",
    "type", "application/x-shockwave-flash",
    "pluginspage", "http://www.adobe.com/go/getflashplayer",
    "FlashVars", "FileName=<%=reportpath%>/report/<%=fileName%>/ALL(<%=fileName%>).swf" 
    );
      } else {  // flash is too old or we can't detect the plugin
        var alternateContent = 'Alternate HTML content should be placed here. '
       + 'This content requires the Adobe Flash Player. '
        + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
        document.write(alternateContent);  // insert non-flash content
      }
    // -->
    </script>
    <noscript>
       <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    id="flexpaper" width="100%" height="100%"
    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="flexpaper.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#869ca7" />
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="FlashVars" value="FileName=<%=reportpath%>/report/<%=fileName%>/ALL(<%=fileName%>).swf" />

    <embed src="flexpaper.swf" quality="high" bgcolor="#869ca7"
    width="100%" height="100%" name="flexpaper" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash"
    FlashVars="FileName=<%=reportpath%>/report/<%=fileName%>/ALL(<%=fileName%>).swf" 
    pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
    </object>
    </noscript>
    </body>
    </html>
      

  4.   

    楼主访问路径有问题,先直接在tomcat里打开试试。
      

  5.   

    楼主访问路径有问题,先直接在tomcat里打开试试。