views:

213

answers:

4

Hello, I am using Flash builder 4 (SDK3.5) to create my flex program. I want to deploy this program and load it to a tomcat server. I configure my "flex server" root folder and other parameters in the project properties. The problem is, that i don't know how to make it generic. e.g. my friend's tomcat is installed in other directory on the computer. I know that in eclipse i can run the server and tomcat from the IDE. I can't see how i do it in Flash builder plugin for eclipse 4. There is a server configuration, but there isn't adapter for tomcat. Any ideas? thanks.

A: 

First, configure server on Flash builder 4 and older is the same. You can see how to do it here

Second, deploying your app on tomcat is not related to tomcat path on any computer, you just need to make sure its not the WebApp directory.

Now, can you explain in more details what is your problem exactly?

FLEXpert
A: 

I also had the same confusion. My approach to this is like this.

Dont specify a server type while you create the flex project. In the compiler arguments you need to specify the "-services" and "-context-root". -services will point to your services-config.xml. This can either be pointed from your eclipse workspace or copy and paste the all the required config files from the flex folder to any other location and link it from there. This is required only while compiling the flex project. So it needs to have the same destinations you use in your project.

-context-root would be your application name.

This makes it generic. you can use the swf in any server.

Manoj M
A: 

Manoj M, Can you be more detailed? I don't have WEB-INF in my project. I have just created a simple flex project(which has no access to any server), and I want to deploy it. I did understand where to put the parameters, I just don't get how to create the services-config.xml. Do I need to create it manutally into a newly created WEB-INF directory?

ronk
Web_inf and services config files are for your Java projects. You can copy the flex folder from BlazeDS to your WEB-INF in your Jave project.
Manoj M
A: 

I suggest you use the flex ant tasks to compile and deploy your swf. It offers the same functionality as Adobe Flex/Flash Builder, but it is more easy to configure for different environments. The tasks are basically wrappers for the commandline flex compiler

A good place to start is http://www.adobe.com/devnet/flex/articles/flex_ant_pt1.html

Furthermore. In your case with a server connection, you should take a look at the context.root and services property of the mcmlc ant task.

Treur