项目 FLASH 远程调用XML问题
HTML代码如下<body>
<DIV align="center" id="innerHtml">
</div>
</body>
</html>
<script>
var html = "";
html += "<object type='application/x-shockwave-flash' data='book.swf?xmlUrl=http://img01.fzdna.com/M/1928/MEDIA/7fcb5ed93ed978852c2449f991a22449.xml' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='860' height='470'>";
html += "<param name='movie' value='book.swf?xmlUrl=http://img01.fzdna.com/M/1928/MEDIA/7fcb5ed93ed978852c2449f991a22449.xml' />";
html += "<param name='quality' value='high' />";
html += "<param name='xmlUrl' value='http://img01.fzdna.com/M/1928/MEDIA/7fcb5ed93ed978852c2449f991a22449.xml' />";
html += "<embed src='book.swf?xmlUrl=http://img01.fzdna.com/M/1928/MEDIA/7fcb5ed93ed978852c2449f991a22449.xml' width='860' height='470' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>";
document.getElementById("innerHtml").innerHTML = html;
</script>
获得参数是肯定没有问题的。。
问题在于如果我通过硬盘方式访问这个HTML的话。。能正常显示FLASH 如
file:///D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/fzdnaV1/media/flash/index 这样访问完全没有问题
但是通过项目形式 如:http://127.0.0.1:8088/fzdnaV1//media/flash/index 访问的
话。。读取不到XML
大家知道为什么么?在线等候
搜索更多相关主题的帖子:
项目 FLASH XML
----------------解决方案--------------------------------------------------------
解决了...跨域问题!
----------------解决方案--------------------------------------------------------
程序代码:
http://bbs.bccn.net/viewthread.php?tid=296251&page=1#pid1719820http://bbs.bccn.net/viewthread.php?tid=296251&page=1#pid1719820
----------------解决方案--------------------------------------------------------
程序代码:
package com.wyp.struts;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}
----------------解决方案--------------------------------------------------------
程序代码:
package com.wyp.struts;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}package com.wyp.struts;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}package com.wyp.struts;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class LoginAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
LoginForm loginForm = (LoginForm) form;
if(loginForm.getUsername().equals("123")){
return mapping.findForward("loginSuc") ;
}else{
return mapping.findForward("loginFail") ;
}
}
}
----------------解决方案--------------------------------------------------------
hi,午夜屠猪男大哥,在的话,请留个QQ号或其他联系方式,有急事请教!在线急等!!!
----------------解决方案--------------------------------------------------------