Thank you Tomislav, 

Regarding serving files from the application server GlassFish (in my case), I 
had to previously (for my Java/BlazeDS stuff) setup an Apache configuration 
file to route all incoming traffic for 


https://mydomain.com/myWebApp 


to GlassFish to handle. So, I wonder if the index.html file you mentioned could 
simply be dropped into the myWebApp folder (?). There's no myWebApp/ROOT folder 
in my GlassFish directory, and while I could create it, I wonder if this is a 
Tomcat-specific requirement (could you clarify)? 


Assuming we can configure the servers to route the traffic correctly, is there 
any advantage in placing the bin-release files behind Apache webserver, in the 
GlassFish webapp folder? Seems like this routing becomes more complicated since 
we now have two pass the traffic through an extra layer (Apache <--> GlassFish) 
rather than just Apache (must consume more CPU cycles, etc.). But, does this 
improve security, for example, since it's behind another firewall? Or, provide 
any other benefit worth considering? Otherwise, dropping in the public_html 
folder seems much simpler. 


How those of you using BlazeDS -- do you place the contents of your bin-release 
folder in public_html, or in the webapp folder in the Java application 
webserver? 

----- Original Message -----
From: "Tomislav Pokrajcic" <[email protected]> 
To: [email protected] 
Sent: Sunday, September 29, 2013 11:13:22 PM 
Subject: Re: newbie confused how to deploy Flex app to Linux server 

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, [email protected] 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