Re: servlets (Greg Lindquist)
Kenny Jenkins <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <[email protected]> |
Servlet services, as described in the Macromedia Flashremoting documentation, are not currently implemented in OpenAMF. Your best alternatives include a JavaBean service, Java Class (POJO) service, or EJB. The Macromedia FlashGateway does implement a Servlet service, which basically forwards your request on to your servlet. You can pass objects created in your Actionscript that you can retrieve on the server side from your servlet request attributes using the attribute name "FLASH.PARAMS". If you are using OpenAMF, but want to simulate Servlet services, a workaround is to just create a simple Java Class service that gets a RequestDispatcher and calls forward() to send your request on to your servlet. I have written small test programs that do this, but have not looked in depth as to how this may affect your program context...if at all. Servlet services (and all the other types of Flash Remoting services) are described in the Macromedia Flash Remoting documentation at this url: http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/usingFRJ2EE5.htm#1166890 Servlet services are also discussed in the Oreilly Flash Remoting book starting on page 254. All the Flash Remoting Java services are described here: http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/usingFRJ2EE.htm Incidentally, I pointed out some time ago that Servlet services were not implemented in OpenAMF and one of the OpenAMF developers (Sean?) indicated he did not know they existed, but it should be easy to implement. I guess it has just sort of slipped through the cracks. > Message: 1 > Date: Fri, 8 Apr 2005 15:56:45 -0500 > From: Greg Lindquist <[email protected]> > To: [email protected] > Subject: [Openamf-user] servlets > Reply-To: [email protected] > > Hi, I'm new here and am pretty much new to the world of remoting. So, > here's my question and be gentle... > > I have a simple servlet that takes a variable and matches it up > with an oracle database... So here's an example... > > Name = Bill this returns [email protected] > ... Easy, right? > > Well, this servlet is stored in tomcat, and is able to operate > great > with html. But I'm experimenting with flash, as I enjoy the > possibilities with that come with it. > > In flash, I'd like to take a button that has a variable tied to it. > That variable is named Bill... So when you click on the button with > the value of bill, I want to retrieve the database info attached to > bill.. > > How to I forward Name = Bill to the servlet with the use of > openAMF? is this possible? ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click