Hello. Thanks in advance for any help or advice.
I am using; Java 1.5, Tomcat 5.5, openamf, fmx 2004 pro.
I bought "Flash Remoting, the definitive guide by Tom Muck". However, most documentation directly relates to the bought version of Flash Remoting and JRun 4. So i am having a little trouble getting things working myself.
I have actually got some remoting to work in Flash, a simple HelloWorld example. However, i only got this working by actually puting and compiling my Java class inside openamf (the following directory structure):
Tomcat
------->Tomcat 5.5
-------------------->webapps
------------------------------>openamf
---------------------------------------->WEB-INF
-------------------------------------------------->classes
This worked. However, from what i understand, this is not how it should acuatlly be achieved. What i should actually have (i think) is, my own completely self-contained webapp, and point it to the remoting gateway.
So what i did was:
1) Copy openamf.jar file into the lib directory of my webapp.
2) add the following XML to my own webapps web.xml file (inside WE-INF).
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>foo</servlet-name> <!-- mapping name below -->
<servlet-class>ByeByeWorld</servlet-class> <!-- name of class -->
</servlet>
<servlet-mapping>
<servlet-name>foo</servlet-name> <!-- finds same name above and looks up the class -->
<url-pattern>/ByeByeWorld</url-pattern> <!-- the url that can be typed in the browser -->
</servlet-mapping>
<!-- this is what i added -->
<servlet>
<servlet-name>FlashGatewayServlet</servlet-name>
<servlet-class>../openamf/gateway</servlet-class><!-- HOW DO I GET INTO OEPNAMF FROM HERE? -->
</servlet>
<servlet-mapping>
<servlet-name>FlashGatewayServlet</servlet-name>
<url-pattern>/gateway</url-pattern>
</servlet-mapping>
</web-app>
|
Area of confusion...
How come i can type
http://localhost/openamf/gateway into my browser and it (as it should do) return a blank page (Where is the gateway, i can't see anything directly relating to it inside the openamf servlet?) Secondly, inside the <servlet-class></servlet-class> tag, is this what points to the actual remoting gateway, is this what makes remoting work and hence i should 'point' my webapp to it?
My main question is:
What goes inside the <servlet-class></servlet-class> tags that are meant to find the remtoing gateway, inside my webapps web.xml? (assuming i already have the other <servlet-class> tags set-up to point to the actual Java class that i wrote) ?
Massive thanks for any help, really is appreciated.
Regards, snapple