The best place for Flex files would be somewhere in Apache public_html folder. In order to access your app with http://mydomain.com/myapp, create a subfolder public_html/myapp and copy everything from bin-release folder produced by Flash builder.
Also, rename autogenerated application html file (Main.html) to index.html.

You could also serve your app from Tomcat, but in that case your access url would be something like:
http://mydomain.com:8080/myapp
In case you want to do that (and guess not because you already have Apache http) place your files to webapps/ROOT Tomcat folder.

Cheers,

Tomislav

On 30.9.2013. 5:51, modjkl...@comcast.net wrote:
Hi experts,

Newbie question about deploying my first Flex application...

My current environment is:

Hosted Linux dedicated server running GlassFish fronted by Apache webserver:
  - Apache Webserver
      Directory structure is:
          public_html (folder)
              index.html
              myWebsiteFiles (folder containing all my website files)
- GlassFish Java application server (BlazeDS, Java POJOs/Applets)
      Directory structure is:
           myWebApp (folder)
              WEB-INF (folder)
                 web.xml
                 lib (folder)
                 flex (folder for BlazeDS settings)
                 classes (folder containing all Java stuff)
              META-INF (folder)

Local development desktop computer:
  - MacPro OSx running Flash Builder 4.6
    Flash Builder settings:
       Properties > Run/Debug Settings > Main > Edit > URL or Path to Launch:
          /local/path/to/folder/bin-debug/Main.html

Currently everything runs great, but as you can see, the files run from my 
local computer's bin-debug directory. However, it does prove that all the Java 
and BlazeDS stuff works fine.

I know the next step is to execute from Flash Builder: Project > Export Release 
Build... and this generates the required files in a bin-release folder that I need 
to copy to the server. But, where do I place these files on the server?

Tutorial #1 says, copy files in bin-release folder to the website's public_html 
folder:

http://www.youtube.com/watch?v=z0YTZm1v7qQ

Tutorial #2 says, copy files in bin-release folder to the Tomcat (or, GlassFish 
in my case) application server webapp directory (I'm guessing, this is 
somewhere in the WEB-INF folder?):

http://www.tutorialspoint.com/flex/flex_quick_guide.htm

Are both methods possible? If so, is one preferred over the other? Or, what are 
the tradeoffs to consider in making this decision? (My application is about 5 
MB in size)

If the recommendation is to place in GlassFish webserver, which folder on the 
server should I copy all of the bin-release folder's files to from my Mac? Is 
it: myWebApp/bin-release?

And, I assume I'd then need to instruct Apache webserver to send all of the 
webapp traffic to GlassFish somehow (is that right? I believe I had to do that 
for the Java traffic to get routed correctly originally)?

I tried to find this on Google, but most instructions at this point simply say 
"deploy to webserver". I'm not using Ant or anything else; just moving the 
files manually.

Thanks in advance for any comments.



Reply via email to