On 1/24/07, Eric Rank <[EMAIL PROTECTED]> wrote:

Hi,

First, this is probably not a question for the dev list, but rather
for the user list (http://struts.apache.org/mail.html#subscribing)

I haven't done much with Flex, but I'm familiar enough with the
technology to hopefully shed some light on your situation. Struts is
designed to serve HTTP requests. I don't think Flex is designed out
of the box to use HTTP to transfer the serialized objects you need.
Basically, Struts, and the servlet container that it runs in, just
sends HTTP responses. By default, Flex uses a different protocol.


Well, sort of. If you just ignore all the fancy bits of Flex, you can use
the loadXML API to make a request to a servlet and send back JSON wrapped in
minimal XML. Then 'eval' the JSON, and you have your response in an
ActionScript data structure.

--
Martin Cooper


As such, you probably want to check out the Flex HTTPService, which
looks like it is designed to make use of HTTP responses, which a
Struts app will serve, within Flex.

Check out this article:

http://www.adobe.com/devnet/flex/articles/struts.html

Eric Rank



On Jan 24, 2007, at 9:00 AM, einundswanzig wrote:

>
>
>
> einundswanzig wrote:
>>
>> Im new in Struts, in fact im pretty new in Java, but i have
>> programmed for
>> Coldfusion, C#/VB and Flex. Im trying to connect to a J2EE server
>> with
>> Struts on it using Flex. Flex is able to call a java component on the
>> server and execute a method and then serialize the result and
>> deserialize
>> it in an Actionscript(scripting language of flex) object. In my
>> imaginary
>> app Flex will provide the View, so im trying to find a way to enable
>> Struts to serve just a result without a JSP or HTML page, i just
>> want the
>> result. Oh god this is confusing....
>>
>
> Sorry, may be i am unable to explain what i want to do, so i will
> enter in
> some details. What i understand is that when a request to a Struts-
> enabled
> app, the request is passed to the controller, the controller then
> create
> some kind of object based on the request and then send that to the
> "handler"
> then the handler do whatever it should and then send a result
> (forwardsomehing is called) back to the controller which at the end
> render a
> page. What i want to do its avoiding the controller render that
> page, and
> just sent back "the result", for example an object, a bean to be
> consumed by
> flex...Just like if you were calling a function, since Flex is able to
> serialize java objects and deserialize them into actionscript
> objects. I
> mean, im trying to enable Struts to serve to different clients, for
> example
> Flex or an applet...
> --
> View this message in context: http://www.nabble.com/Struts-service-
> facade-tf3078810.html#a8563271
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to