Flex with servlets?

how to integrate servlets with flex.. could anyone give some examples of it?

quebequiano,
it all depends if you want your login to be in the Flex part, or simply in a JSP page before you get to the Flex part. Either will do the job, it just depends on your requirements and preference. If you go for a JSP then you can probably tap into the built-in j_security_check functionality and configure your server to check whatever you want, otherwise the route you suggest would be fine. You might want to somehow encrypt the user details before sending them over a plain HTTP link.
Richard

Similar Messages

  • Flex with Hibernate using HTTP

    Hi All,
    am new to Flex. Can any one post a simple code on Flex with
    Hibernate using HTTP , i mean connecting to database using
    Hibernate and invoking the hibernate by using the HTTP service.
    can we have a sequence like
    Flex(MXML)->JSP->Hibernate->Database .Is it possible?
    Thanks in Advance

    > can we have a sequence like
    Flex(MXML)->JSP->Hibernate->Database .Is it possible?
    That's exactly what you're going to have and it certainly is
    possible. (Replace the JSP with Servlet, Struts Action, JSF or
    whatever)
    Usually you'll send data back -- output to JSP or write to
    HttpServletResponse object -- in XML or JSON format. The data would
    be delivered to the result event of the HTTService in Flex. If it
    fails for some reason, the fault event of HTTService class would be
    invoked.
    The important thing to realize about Flex is that it cannot
    directly connect to a DB; you need a server side action that would
    get data from wherever write it to response. It's more like Ajax
    calls to a JSP/Servlet.
    ATTA

  • How to use Flex with EJB3?

    Anybody know how to integrate Flex with Java?
    I have a EJB3 project with JPA etc...
    Have to use Eclipse with Flex plugin or can i use Flex Builder and Eclipse only for java classes? (preferring the second option)
    I'm getting crazy, because need this for my college work, too fast as possible.
    Please any explanation or sample.
    Thanks everyone.

    Matt you say, i do not need to write servlet, create wsdl...
    But if i dont do this, my Java Business Rules will be visible to client ?
    If yes...
    1- I need to write Servlet to use HTTP protocol to connect with Flex, then create wsdl of my EJB3.
    2- This wsdl will create client side of my application, then i create my Flex interface normally using HTTP Blaze DS ?

  • Please help me, I need to use Flex with CF

    Hi everyone,
    I am starting to retract my brain from an intense 2 days to
    figure out how to use Flex with Coldfusion. I am using Coldfusion 8
    Beta (this part is good, don't need help for CF itself). I am also
    using Flex Builder 2 (with chart but this not the topic). I
    installed FDS 2.5 before to install ColdFusion 8 but I think CF8
    have is own FDS or something like that... anyway, it might help to
    mention it!
    Well, I tried HTTPService, RemoteObject, WebSer vice -
    NOTHING WORKS!!! Argh! Did I mention I spent 2 days? ;-)))
    Well, I start with the basic: a login form with an email (as
    a username) and a password to be validated. I have a CFC to do the
    validation and return a simple message (string): "OK' when it is
    valid and a custom message when it is not valid; depending if it is
    the password and/or the email which is not valid.
    I always got an error. Since the error is different depending
    of the method I use, I will explain the latest method I used in
    this message and try to concentrate on that method specifically!
    The method is WebService and here is the error:
    faultCode:Server.Error.Request
    faultString:'HTTP request error'
    faultDetail: 'Error: [IOErrorEvent type="ioError"
    bubbles:false cancelable=false eventPhase=2
    text="Error #2032: Stream Error .
    URL=http://localhost:8501/iDashboard/login.cfc"].
    URL: http://localhost:8501/iDashboard/login.cfc'
    Any help will be very useful!!!
    Thank's

    Cyber,
    This may be what you are looking for. It worked well for me.
    Flex is sweet, but with the number of people confused about setup
    with CF they sure aren't making any friends.
    Flex/ColdFusion
    setup

  • Integration of Adobe Flex with SAP Web Dynpro ABAP

    I am new to adobe flex development. i am following a tutorial prepared by
    Mr. Karthikeyan Venkatesan (Infosys Technologies Limited) Integration of Adobe Flex with SAP Web Dynpro ABAP-for ABAPers
    He used flex 3 to develop the flex application. i am using flex 4 downloaded from adobe(At a time Build release I used low version only 3.5). I followed all the steps. At a time of Run the data was not came.
    How to fetch the data?
    Please Guide how to proceed.

    Hi Laxmikanth,
    For Adebo Flex help..
    Please go through Thomas tutorial..
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10989ef6-968c-2b10-50a9-eb34a5267163&overridelayout=true
    and ...
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307b434f-ff32-2b10-e885-991247270480?quicklink=index&overridelayout=true
    Hope it might helps you
    Thanks,
    Kris.

  • Flex with jsf Application

    Hi
      I am new to flex and i have a knowledge on jsf .We got a requriment to integrate the flex with jsf .
      I googled and i developed the sample application using the fiji (Exadel ) .
      When i an running the application in the jboss I GOT EMPTY page then after deselecting the check box of 'blockjavascript' in the browser
      am able to see the swf file in the page
    can any one help me..
    My Project
    The   mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="1024" height="715" xmlns:ns1="*">
    <mx:Form x="22" y="47" width="1200" height="680">
    </mx:Form>
       <mx:Button x="22" y="5" label="This is Prapansolution" width="280"/>
    </mx:Application>
    The .jsp
           <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:fiji="http://exadel.com/fiji"
              xmlns:a4j="http://richfaces.org/a4j"
              xmlns:rich="http://richfaces.org/rich"
              xmlns:ui="http://java.sun.com/jsf/facelets"
               version="2.0">
             <f:view><h:form id="myForm">
              <fiji:swf src="/faces/FirstFlexApp.swf" id="demonew"  bgcolor="#FFFFFF" width="820" height="480">
              <f:param name="text1" value="Hello" />
             </fiji:swf> </h:form></f:view>

    "vikbar" <[email protected]> wrote in
    message
    news:gb0tug$7je$[email protected]..
    > Hi Amy,
    >
    > Isnt the HistoryManager approach more specific to Flex
    application i.e if
    > user
    > is just navigating with in the flex application? In my
    case the user will
    > navigate between a JSF page which does not have any SWF
    file and the
    > another
    > one which has swf file embedded. Now everytime when the
    suer moves to the
    > flex
    > embedded JSF page from the Non Flex JSF page these are
    the steps which are
    > always going to happen :
    >
    > 1.) System Manager will get initialized and will create
    PreLoader
    > instance.
    > 2.) The preLoader will then try to download the swf
    file. Now since this
    > is
    > the second time the user is coming back to the flex page
    so the broswer
    > would
    > have already cached this swf, so Preloader will skip the
    downloading
    > swf/RSl
    > step and hence you wont see any initialization progress
    bar.
    >
    > 3.) New Application object will get instantiated and
    will go through its
    > whole
    > lifecycle.
    >
    > So, I guess historyManager approach will work only if
    the user stays on
    > the
    > flex application only and navigates with in flex
    application itself(so in
    > that
    > case if the user clicks back then it knows which flex
    component or view to
    > display), but in my case user will completely move away
    from flex page to
    > a
    > JSF page and then will try to come back.
    >
    You'd need to put the right stuff in the url to make it work,
    just like if
    you were calling a page that's expecting GET params. I don't
    really use the
    HistoryManager, so you'll need to either look into this
    yourself or ask
    someone who knows more about it.
    HTH;
    Amy

  • Flex with Eclipse WST

    Hi I'am new to Flex, I like to get started using Flex,
    ActionScript3 using Eclipse IDE.. Iam looking for some tutorial or
    workshop article how to get Flex with Eclipse IDE.

    Hi,
    Are you talking about using the Flex Plugin or the Flex_SDK?
    Not sure about the plugin but you can check out my post on
    what I had to do to get the sdk to work with Eclipse 3.3 at
    http://www.plentifuldesigns.com/?p=13
    Hope this helps
    - Keith

  • Flex with Jboss

    Hi Friends
    I'm developing Flex with java using Blaze-DS under the
    Spring MVC. I've problem in using Jboss, Based on BlazeDS
    Installation guide
    http://opensource.adobe.com/wiki/display/blazeds/Installation+Guide
    configure the jboss with Flex.There is no problem with Flex running
    in Jboss but it couldn't establish connection and business logic
    with java, The Jboss server couldn't through any errors. These same
    war file run under the tomcat server. So please help me to solve
    this problem.
    Thanks&Regrads
    Prakasam

    I don't have any experience with Spring MVC but I was using
    JBoss with Blaze-DS without a problem.
    so my next question is, can you make a echo to work??
    eg, make a function that returns the input string back to the
    flex client.
    Ries

  • Using Flex with JSPDynPage

    Hi,
    Can we develop a JSPDynPage component, using Adobe Flex as the UI instead of using HTMLB? (by embedding flex components in the jsp file). Is it possible to call methods in other java files from a flex application?
    Did anyone try to develop a JSPDynPage component this way?
    Regards,
    Sudhir

    Hi,
    Pls check out these links below for this info -
    Adobe Flex with RFC - 
    Binding Data through function module in adobe to display charts
    How to connect to SAP Database from a Adobe flex application?
    Adobe flex and Sap
    Adobe Flex within SAP NetWeaver Developer
    Regards
    Lekha

  • Using Flex with Microsoft Project

    I am absolutely brand new to FLEX. What I saw on the Adobe
    site was a data chart that could be drilled down to expose
    additional layers of "contriburory detail" for the master graph.
    What I am wondering is if it is possible to do something
    similar using Micrsoft Project Data as the basis. MS Project will
    allow users to save the file as XML. So, all the data should be
    available in a form understandable to FLEX.
    Here's the tricky part (and I can add more detail if needed).
    Project will create a summary line (at some level of indentue) and
    show you a calculated %Complete such as 47%. So, level of indenture
    1 I have the major summary tasks of the project at various status
    of %Complete. I believe FLEX can make some type of bar or pie chart
    out of that for me. What I want to do is click on a "Level1"
    indenture and have it expose the Level2 indure that contributes to
    that 47%. Then drill on one of the Level2's to Level3 .... to Level
    "n".
    This needs to be accomplished in "stand alone" fashion so the
    ultimate user can launch a desktop application and tell the
    application the name of the Microsoft Project XML file. We will not
    be able to use Client/Server ... client side only with the file
    located either locally or at least on a network drive.
    Can this be done? Has anyone looked at a MS Project XML
    schema to see if there is sufficeint information available?
    OK, now the blunt truth. It ain't %Complete that I care
    about. What I care about is BCWS, BCWP, ACWP, %Complete, and a few
    other parameters. These are the "Earned Value Fields". If you do
    not know what they are, don't worry about it just now .... it is
    really all just time phased data.
    Can anyone give me some advice or an opinion? TIA.
    Jim

    Hi,
    Pls check out these links below for this info -
    Adobe Flex with RFC - 
    Binding Data through function module in adobe to display charts
    How to connect to SAP Database from a Adobe flex application?
    Adobe flex and Sap
    Adobe Flex within SAP NetWeaver Developer
    Regards
    Lekha

  • Communicate with servlet after using Java Web Start?

    Is it possible to communicate with servlet to get data back and forth
    after using Web Start to download the client application?
    The demos come with Java Web Start are applications which are
    standalone, don't need communicate with the servlet on Web server
    after being launched. I am wondering if it is possible, and how (HTTP
    & JAX-RPC)?
    Thanx in advance.

    I've done this using HTTP. I get the server and port from the codebase:
    BasicService bs = null;
    try {
    bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
    String codeBase = bs.getCodeBase().toString();
    and use the java.net.HttpURLConnection and java.net.URL classes to send HTTP parameter values to the servlet and to receive results from the HttpURLConnection's input stream.

  • Displaying *.pdf file on browser with servlet

    hi all
    this RAMESH,struggling to display a pdf file on browser from a remote mechine
    earlier i tried with servlet
    response.setContentenType("application/pdf")
    out.println();
    by this i am getting only some data as below
    endobj
    4 0 obj
    <<
    /ProcSet [ /PDF /Text /ImageB ]
    /Font << /Fo0 21 0 R /Fo12 24 0 R /Fo13 27 0 R /Fo16 30 0 R /Fo18 33 0 R /Fo19 36 0 R >>
    >>
    endobj
    For this purpose i have gone thru www.lowagie.com
    and gone thru all examples but i am not getting how to display on browser or at least awt frame
    please requesting all for suggest me some way
    tanks all
    -Ramesh

    are you trying to
    a) create a PDF dynamically
    b) send an existing PDF

  • How to use JNI with Servlets

    Hi
    i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
    Can some one show me a sample code using JNI with Servlets.
    thanks very much

    hi,
    I am also facing the same problem,
    when I am using JNI with stand alone application it works fine but when i tried to use it with a servlet It gives unsatisfied linker error
    stack: java.lang.UnsatisfiedLinkError: createSocket
         at RelayConnector.createSocket(Native Method)
         at RelayServlet.doGet(RelayServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
         at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
    It seems i have to do some path settings in my iplenet web server.
    If some one have faced the problem i would be glad to know the solution for this, i am literally bugged up,....

  • Problem with Servlets

    Hi,
    I am Tejas , a newbie with servlets. Now, I have a servlet which contains a Javascript method. On clicking a link , the Javascript method is called.
    But however, I find that there is some trouble. I created a class called MainFrames.java, the object of which I am instantiating in the Javascript method.
    But this code doesnt work properly. I have given the snippet below
    out.println("<script type='text/javascript'>");
    out.println("function threader()");
    out.println("{");
    out.println("alert('Inside Threader');");
    out.println("<%@ page import=\"XcForm.MainFrames\"%>"); //I have a hunch that this statement is the problem
    out.println("<%");
    out.println("MainFrames mainframes = new MainFrames();"); //without the import statement above, the MainFrames.java class is not being recognised
    out.println("%>");
    out.println("}");
    out.println("</script>");
    Thanks in advance,
    Tejas

    Do not put presentation code in servlets. Put them in JSPs. And mixing serverside code (scriptlets) and clientside code (javascript) this way is indeed not going to work. That code will certainly not be executed in the order as you write. Serverside code is executed at the server and is finished when the response is completed. So any serverside code inside clientside code is alreay executed. Clientside code is executed at the client and will only execute when the response is completed (onload, etc) or when the client invokes it (onclick, onsubmit, etc). Further on, do not put business code in presentation code. Put them in servlets.

  • JSF 1.2 with SERVLET 2.3

    Hi, i've download the latest JSF 1.2 RI but i can't see any page as i get the following error:
    ava.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getContentType()Ljava/lang/String;
    at com.sun.faces.context.ExternalContextImpl.getResponseContentType(ExternalContextImpl.java:277)
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:167)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:131)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    The getContentType method that the exception describes is only available in servlet 2.4 but i'm using a servlet 2.3 only container. Can i use JSF 1.2 with servlet 2.3 ?
    Thanks

    I'm 90% sure that you cannot. JSF 1.2 is intended to be part of Java EE 5.0. Since Servlets 2.3 are part of J2EE 1.3, I don't think that it will work.
    Adam

Maybe you are looking for