Flex deploy on tomcat, when open in browser, it is blue blank - apache-flex

My project including A.swf and B.swf, A.swf embed in a html file, A.swf will load B.swf after initialed. The project test ok.
Now I deploy it on tomcat. Open the url http://*:8080/myproject in browser, the screen is blue blank, it seems B.swf is not loaded.
I try some methods: add crossdomain.xml, and trustPlayerFile, also i use apache http server as a proxy. But the problem is not solved.
Can someone help me?

Try to add your tomcat catalog to Global Security Settings panel

Related

Styling not loading when implemented on server

When running my website locally (via yesod devel) the styling loads up and all is good.
CSS files are loaded correctly. Using this method
But when uploaded onto my amazon ec2 server styling is not loaded correctly.
I'm using nginx that listens to port 80, then redirects it to port 3000 where my yesod webapp is running. My nginx.conf settings.
So I can directly got to header.css showing that the static files are passed on to the user browser. However, for some reason the css is not connecting correctly.
Another thing I've noticed is that if I directly go to the IP and port 3000, the default favicon.ico icon will get loading, whereas if I go to the domain it will not get loaded.
Any ideas?
Does the approot setting in config/settings.yml agree with the start of the url you were using to access the ec2 server? The log you show could certainly be explained by it being wrong. Yesod builds in fully qualified urls, using the approot as the prefix, for all of the additional pieces needed to build up a page. (Check the page source to see what Yesod has produced.)
If you are running using yesod devel for now, the approot setting will be the one set for the "Development" environment - which will be the one in the "Defaults" section if you have kept the structure of settings.yml as it was when you created your scaffolded site.
Found nothing seriously wrong on your nginx.conf file.
I hit http://www.finance-web.biz/static/css/header.css and the result is fine.
/*!
* Extra header style
*/
.beta {
color: #CC3300;
}
Maybe it's something cached in your browser.

MVC CSS not rendering in Visual Studio When debugging

I have an issue where the CSS is not rendering properly when I compile the MVC project and view it on [https://localhost/MyApp.] The buttons, and background image are not showing up. It worked one time, then for some reason it stop working. Something with the pages not caching? I used firebug to check to see if the pages were missing, and no errors were found. Something in Visual Studio 2010 settings need changing or IIS?
However, when I publish it to an individual website, instead of in the (default web site) area, using [https://localhost:444] website I setup in IIS 7.5, the css seem to render fine.
What is the problem?
One common problem that occurs on MVC 4 websites is difference between release and debug when you have css bundles. It does not have to be your case, but you have the symptoms.
I will explain on an example.
If you have bundle which looks like this:
var styles = new StyleBundle("~/Content/css").Include(
"~/Content/toastr.css",
"~/Content/flags/stylesheets/flags16.css",
"~/Content/flags/stylesheets/flags32.css",
"~/Content/Site.css")
And in flags16.css you have:
background:url('flags/images/flags16.png');
Which uses file in ~Content/flags/images/flags16.png
That will work in release mode (compilation debug="false" in web.config), because all of your css files in bundle will be served as 1 file located at ~/Content/css with relative path 'flags/images/flags16.png' pointing at correct file.
However, in debug mode, ASP.NET MVC will disable minification, and if you used #Styles.Render("~/Content/css") inside your view, it will render link to every one of your files contained in a bundle, so there will be a:
<link href="/WorkOrders.Web/Content/flags/stylesheets/flags16.css" rel="stylesheet">
And from that path, relative path to image is not ok, so images in flags16.png will not be rendered.
One way to solve this, you need to move your .css file which contains references to images to the location where bundle is pointing (~/Content in this case), so it will have same path when it is served minified and raw.
UPDATE As your app is not mvc4, and you have problems when your app is not in the root of your web site (i.e. when it is in localhost/myapp) then you need to check paths in references to your pictures. It is possible that you referenced them absolutely ('/somepath/mypic.png'), and when your app is in localhost/MyApp, path needs to be localhost/MyApp/somepath/mypic.png. You can solve that by replacing path with #Url.Content(~/somepath/mypic.png), if you are using it from cshtml. If path is in css, then you need to put relative path to your pictures.
I have just been battling with the same problem - images, scripts and css not being found or rendered. (Visual Studio 2013, Windows 8.1. Project moved across from Visual Studio 2010.)
The problem was caused by a line in Web.config:
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
It seems that because the IIS Express application.host file already contained this mimeMap definition, IIS Express couldn't cope with it being defined again.
Removing this line from Web.config completely solved the problem.
It looks like your web site is configured to use SSL. Except that when running locally you probably do not have a valid SSL certificate which is trusted by a certification authority and the client browser is refusing to download the static resources. One way to fix that is to add the address as trusted. So copy paste the url to some of your CSS files in your browser address bar:
https://localhost/MyApp/Content/Main.css
and you will see a warning about the invalid certificate that you could ignore by adding an exception to your browser. Hit Ctrl+F5 to force a refresh once the exception is added and your application should start working properly.
When I had this problem I found that all of my CSS and Script files were encountering a HTTP 500 error when they were being downloaded in the browser (Firefox 33.0.2).
Killing the instance of my browser in the Task Manager and then starting afresh fixed the issue for me.

Glassfish docroot and unreachable crossdomain

I am trying to access a webservice from Flex. The webserivce is deployed on Glassfish 3.1 application server. Now, Flex needs a "crossdomain.xml" file at the root (top-level) of the server.
Here is the problem: I searched and found that the crossdomain file should be inside the docroot directory (c:\Glassfish3\Glassfish\domains\domain1\docroot). That is exactly the where I put it, and yet I get a 404 when I try to reach it.
I also tried putting it under applications but it didn't work.
What should I do?
Thank you,
Ido
OK, I found the answer, though I'm not sure that this is recommended.
Inside Glassfish admin console, under configurations --> server-config --> Network config --> http-listener-1.
I changed the address from "0.0.0.0" to the actual IP address of the server.
Now It works fine and I am getting access to crossdomain.xml, but as I said, I am not so sure that this action is recommended and won't make other errors.
Thank you.

AS3: Security sandbox violation

I want to go live with my site.
...but I need help with a security violation I am incurring.
I've seen various threads on this forum regarding a crossdomain.xml file to include and link to, but I don't get it... no matter what I try I still end up with the same result. You'll note below that it is not recommended to use crossdomain hacks.
FWIW, this only happens when I export a release build... I can load the php data w/out an issue in my debug/developing phase locally in Flex.
What gives? When I make a PHP based request for data I always get this error popping up:
Error #2044: Unhandled securityError:.
text=Error #2048: Security sandbox
violation:
http://alubow.com/jml_testing/viewable/alubow_project.swf
cannot load data from
http://www.alubow.com/jml_testing/foldergrab.php?ipath=assets/bitmap/portrait_thumbs/&tpath=assets/bitmap/portrait_imgs/.
at utils.php::DirectoryReader() at
alubow_project/newScroller() at
alubow_project/mainClickOut()
Is there code I need to add to get this to work? Do I need to configure the server I am using?
I will need to go live with this site soon and these errors I am getting both locally and serverside (via a browser) are unacceptable.
COULD THIS BE A PROBLEM WITH THE FLASH PLAYER I HAVE INSTALLED?
I have the debugger version of flash player 10.
jml
The problem is with the www prefix. I guess you are trying to load a page with out the www subdomain and the URL you are looking for does have that prefix.
Now, what you need to do is one of the following:
change the request url
add both www.yourdomain.com And yourdomain.com to the crossdomain.xml
call the url dymanicaly. this is the best solution but needs some more work. you can get it done using ExternalInterface and connection to JS here. OR you can use the BrowserManager.
Enjoy!
It may be because your app is requesting from www.alubow.com when hosted from alubow.com, which triggers a request for http://www.alubow.com/crossdomain.xml, which doesn't exist. You could refer to your app as www.alubow.com/jml_testing/viewable/alubow_project.swf and avoid the error.
Alternately, you could add a crossdomain.xml file to www.alubow.com.
I know this is weird but for local files loaded through the flash player you probably just need to hit this page. Look near the top right for something that looks like an example image. It's actually a Flex application. Click successive tabs until you read the Global Security Settings panel (currently 3rd from the left, with an image of a globe and padlock). Select the "Edit locations" menu, and choose "Add location". You can then add your swf or your folder of swf's into the whitelist and they'll be able to access outside resources magically.

Image shows up in Design Preview, but not Application

I have some strange behavior.
My embedded images show up in the Flex Builder Design Preview, but are not displayed when the application is run. The images have relative paths (/assets/images/...), and the application is run on the server (wamp). I've appended the path to the compiled location (http://localhost/...) and tried to display a image in the browser, and the image exists, too.
I've compiled it via FlashDevelop, Flex Builder, and Ant. I've deleted and remade the bin/bin-debug/release/bin-release files to no avail.
Anyone run into this problem before? Thanks for any help!
Try using httpfox extension to debug the application requests, there you would be able to see the images path in the server.

Resources