Create a dynamic web project of java in Eclipse. Add Struts2-core-2.0.11.jar file to the lib folder. You can get this jar file from appache site. Create an xml file with name Struts-plugin.xml. Open the file and write:
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!DOCTYPE struts PUBLIC
“-//Apache Software Foundation//DTD Struts Configuration 2.0//EN”
“http://struts.apache.org/dtds/struts-2.0.dtd”>
this is doctype now write
<struts>
<constant name=”struts.enable.DynamicMethodInvocation” value=”false” />
<constant name=”struts.devMode” value=”false” />
<package name=”nameOfYourPackage” namespace=”/nameSpace” extends=”struts-default”>
<action name=”requiredURLName” class=”className”>
</action>
<!– Add action classes here –>
</package>
<!– Add packages here –>
</struts>
Now in your flex 3 code use HTTPService tag to call the service provided the url of the configured class.
The url will look like http://localhost:8080/nameSpace/requiredURLName.action.