Meaningless Drivel is fun!
The moose likes Flex and the fly likes Call servlets in Flex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Call servlets in Flex" Watch "Call servlets in Flex" New topic

Call servlets in Flex

udara liyanage

Joined: Dec 17, 2009
Posts: 1
i have a servlets in which doPost() and doGet() does not output a XML.
how can I call that servlet and populate the data in a datagrid of Flex mxml file???
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11765

This is something I haven't tried, so you may have to experiment a bit.

The dataGrid is populated from a dataProvider. One possible dataProvider is the HTTPService. The relevant parameters would be:
  • contentType="application/x-www-form-urlencoded|application/xml"
  • resultFormat="object|array|xml|e4x|flashvars|text"

  • Since you can specify that the resultFormat is text, you should be able to use that.

    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
    I agree. Here's the link:
    subject: Call servlets in Flex
    jQuery in Action, 3rd edition