Comments inline:

1) Without using Peter's FDS Plugin, what is the easiest way to deploy
a FDS-enabled project as http://localhost:8080/ <http://localhost:8080/>
or
http://localhost:8080/ProjectName/?
<http://localhost:8080/ProjectName/?>  Every example I've been able to
find has it coming out of the flex.war as
http://localhost:8080/Flex/ProjectName/
<http://localhost:8080/Flex/ProjectName/> 



When you are deploying a web application (.war), you specify the
context-root in app-server specific configuration.  Most of them have a
way to specify a single "default web application", i.e. with a
context-root of "/".   For tomcat, this is in the server.xml file I
think.   If you build an "enterprise application archive" (.ear), you
specify the context-root in your application.xml file and so can do it
in a standard way.   The only other thing you need to be sure is that
you configure the context-root in your flex builder project properties
to be "/" and that the paths in any HTTP based endpoints are valid for
your context-root setting.

2) When deploying using FDS compile on server option, how can you
configure your server to acknowledge
http://localhost:8080/HelloWorld/Main.mxml
<http://localhost:8080/HelloWorld/Main.mxml>  when
http://localhost:8080/HelloWorld/ <http://localhost:8080/HelloWorld/>
is accessed? Default .mxml
parameters? I'd figure to use the index.htm with presentation similar
to the template when using a non-FDS enabled version but unclear where
to point the embed items to.



You can specify "Main.mxml" in the welcome-file-list attribute in your
web.xml file - something like:

<welcome-file-list><welcome-file>Main.mxml</welcome-file></welcome-file-
list>

I think it goes right after the servlet-mapping tag.  


3) FDS Plugin Specific - How *should* one break down their content
w.r.t the directory structure provided? I was able to create a simple
sample (one event class, one valueobject, two component .mxml views
called from the Main.mxml. The only way I was able to get any to work
was with everything nested within sub-directories of the WebContent
folder. I'd expect I could use the [source_path]user_classes for .swc
but it didn't seem to play nice with pure .as files.

I am not sure I fully understand this question but the source path ought
to work as long as you put your source files in a directory relative to
the package used by that class.  For example, if you put your classes in
a package called "foo", your source path should contain a directory
called "foo" which should contain the classes in the "foo" package. 


4) Same question as #3 but expand your example answer for a
Cairngorm-ified project.



I don't think Cairngorm will affect this.


5) How to turn all this into a deployable .war or .ear file on a
non-development machine? This is more a general java question but
figured I'd press my luck like that old tv show and make it a 5 pack
o' questions.



There is no real trick to making a .war file other than building the
right directory structure with the files in the right locations and then
zip them up (or use java's "jar" utility).  Note though that there are
special steps you'll need to follow if you want to deploy an FDS based
application as an unexploded .war file.  Specifically this means
disabling the web tier compiler as that requires access to the mxml
files as files, not as entries in as a zip file. 

Jeff 

 

Reply via email to