| Not complete.
Stopped at 4:12 in 9:30 video. Evaluating use of BlazeDS, initial notes below were trying to avoid using BlazeDS. But haven't been able to work out JBoss settings for Web Root and Root URL without BlazeDS. There is another example found about how to use BlazeDS and get correct settings for JBoss. |
Here are my notes on how to create a Flash/Flex/Java J2EE combined project using Eclipse Helios with Flash Builder 4.5 Plugin.
- A similar project is shown in a video at http://www.developersnippets.com/techvideobytes/video.php?id=1849472667
- This is a workaround for Helios Eclipse fails to create flex and java project with Flash Builder 4.5 Plugin - One Or More Constraints have not been satisfied
Prerequisites:
- Install JBoss 5.02 GA edition
- Install Eclipse Helios 3.6.2
- Add configuration for JBoss server to Eclipse (Windows -> Preferences -> Servers -> Runtime)
- Install Flash Builder 4.5 Plugin
- Install MercurialEclipse
Apparently problem is with both Flash Builder 4.0 and Flash Builder 4.5, for combined project for Flex and Java WTP.
- 1. Create Dynamic Web Application - File -> New -> Other -> Web -> Dynamic Web Project
- Next -> Next -> Check Generate web.xml Deployment descriptor
- Click Finish
- Example shows opening BugWorkAround/WebContent/index.jsp - But I don't see that.
- Tutorial tests deployment to Glassfish server, and Dynamic Web Module Version 3.0. Mine is targetting JBOSS 5.0, and Dynamic Web Module 2.5
- On mine:
- Add new JSP file to WebContent folder: index.jsp
- 2. Test the deployment.
- Go to servers view
- Right click the server -> Add
- Add the project to the configured list.
- Run the server, see messages about publishing the project to the server
- http://localhost:8080/WebFlexJavaTutorial/ - See the helloworld message!
- Creating a mercurial repository for this.
- Add link to this article to the index.jsp. Save it. Then check it into Mercurial.
- Since the server was running, this was automatically redeployed to the server. Refreshing the browser window for http://localhost:8080/WebFlexJavaTutorial/ showed the updated page!
- A .war for this project gets copied to JBOSS_HOME\server\default\deploy
- This is a simple Java server side application.
- 3. Video is making a Blaze DS project - We are not doing this step
- Download Blaze DS Binaries (flex-messaging-common.jar, flex-messaging-core.jar, flex-messaging-opt.jar, flex-messaging-proxy.jar, flex-messaging-remoting.jar, flex-rds-server.jar, cfgatewayadapter.jar, commons-codec-1.3.jar, commons-httpclient-3.0.1.jar, commons-logging.jar, xalan.jar)
- Copy Blaze DS Jar files into HOME/Webcontent/WEB-INF/lib
- 4. Create a /WebContent/WEB-INF/flex folder - We are not doing this step
- Blaze DS uses this folder for the flex configuration files (messaging-config.xml, proxy-config.xml, remoting-config.xml, services-config.xml, version.properties)
- 5. Editing the web.xml file to include blazeds servlet - We are not doing this step
- Getting a common template for MessageBrokerServlet and copying it to web.xml
This completes the Java side of the combined Java and Flex app
- 6. Add Flex Project Type to the project
- Right click project in Project Explorer -> Add/Change Project Type -> Add Flex Project Type
- Note: Video example is using Flex 4.1 SDK, we are using Flex 4.5 which looks different
- Click next to configure server technology.
What to set for Web Root when using JBoss with Flash Builder
Google search: flash builder jboss "web root"
Found this link
| These details assuming you are creating a Flex project with blazeds deployed on JBOSS.
a) Install JBOSS 5.1and BlazeDS turnkey blazeds-turnkey-4.0.0.12920.zip from http://opensource.adobe.com/wiki/display/blazeds/download+blazeds+trunk On extracting the turnkey zip you obtain samples.war,blazeds.war and ds-console.war. b) Extract the samples.war as a folder using Java xvf, which should create a folder named 'samples.war'. c) Copy this folder under JBOSS\server\default\deploy. d) Start the server. e) Launch FB and provide the following details in the project creation wizard:
Click on 'Validate Configuration', you should now see message 'The web root folder and root URL are valid'. |