Hi Libby,

You can invoke a servlet, but it's really a deprecated method of
contacting the server from Flash Remoting. It's not a preferred method
as the 
"servicename"."functioname()" invocation isn't as straight forward as a
plain old java object "classname.methodname()" idea.

For a servlet invocation, the service name is the context root of the
web application that holds your servlet. The function name is the
servlet name (as your servlet is contacted via a
ServletContext.getNamedDispatcher(...)). Parameters are send in a
FLASH.PARAMS request attribute so that you can get access to them in
your servlet. The result from your servlet can be set as the
FLASH.RESULT request attribute.

The main reason why people used servlets in Flash Remoting MX was to get
access to the HttpServletRequest (and hence the session), and
HttpServletResponse. You can do this in Flex 1.5 from your plain old
java objects by calling the static accessors to some thread local
variables on the Gateway class:


flashgateway.Gateway

    public static HttpServletRequest getHttpRequest()
    public static HttpServletResponse getHttpResponse()
    public static ServletConfig getServletConfig()

 
Rgds,
   Pete


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to