IS THIS POSSIBLE IN FLEX.

Hi ,
TILL NOW ANY BODY HAS RUN APPLICATION ( calling flex
application in url) WHICH INVOKES A SERVLET PERFORMS
REQUEST/RESPONCE . IF YES PLEASE SOLVE MY CODE.
ELSE
PLEASE HELP ME WITH A SAMPLE CODE/Example.
currently i have a login.jsp in which i am calling
source="./login.mxml"
code for login.jsp
<%@ taglib uri="FlexTagLib" prefix="mm" %>
<html>
<head>
<title>This is calling HelloServlet</title>
</head>
<body>
<form action=./HelloServlet method=POST>
<mm:mxml source="./Login.mxml">
</mm:mxml>
</form>
</body>
</html>
and code in login.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" >
<mx:Panel width="382" height="315" layout="absolute"
horizontalCenter="4" verticalCenter="2.5" fontFamily="Verdana"
title="eCTDViewer-Login">
<mx:Label x="25" y="49" text="UserName "/>
<mx:TextInput x="115" y="47"/>
<mx:Text x="25" y="98" text="Password"/>
<mx:TextInput x="115" y="96" displayAsPassword="true"/>
<mx:Button label="Login" horizontalCenter="-80"
verticalCenter="42.5" textRollOverColor="#408080" />
<mx:Button x="186" y="169" label="Cancel"
textRollOverColor="#408080"/>
<mx:Label x="10" y="-26" text="eCTDViewer-Login"
width="310" height="23" enabled="true"/>
</mx:Panel>
</mx:Application>
and in now i am calling login.jsp in IE 7.0 as url=
http://localhost:8080/flex/login.jsp
it is displaying login page exactly what i want, but after
entering username,password when i click submit button it should go
to HelloServlet, there in servlet i am just printing a message,
but it is not going to HelloServlet, Please guide me how to
do this. and what need s to be configured in web.xml,
/**********************HelloServlet**************/
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
public class HelloServlet extends GenericServlet {
public void service(ServletRequest req, ServletResponse res)
throws ServletException, IOException
res.setContentType("text/html");
PrintWriter pw=res.getWriter();
System.out.println("I can into HelloServlet");
pw.println("<B>Hello!");
pw.println("<B>Hi!");
pw.close();
/***********************web.xml**************/
<?xml version="1.0" encoding="utf-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="
http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>
</web-app>
waiting for reply.

Please note the answer in the flexbbuilder 2 forum:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=582&threadid =1291004&enterthread=y

Similar Messages

  • Is this possible in flex (Urjent Pls)

    Hello guys,
    May i know whether the following task possible in flex or not?.
    I'me  having advertisement magazine published every week.
    We publish  text and image advertisement.
    We use Adobe InDeisign to design  the pages in the magazine.
    Now we need to make software to reduce  the time in designing.
    My magazine page size is 30 x 100 cm.
    We  are going to make a software that will take details of advertisements  from the user and align on the page. And with one click of a button the  program gives output in pdf, jpg or whatever format.
    The program  should automatically adjust the ads for page and we should have options  to move freely drag and align the ads over the page, just like a drawing  surface.
    Now what programming language should flash, flex  or whatever.
    Can you experts pls suggest us.
    Anticipating  reply.
    Thanks

    Hi,
    So basically you have 4 steps
    1. load images
              for this you would use a file reference list to browse and load images into a listbox
    2. drop images
              you could drag the image from the listbox onto the drawing surface (skinnable container is a good option)
    3. move/size images
             http://gumbo.flashhub.net/sizeimage/  - this code will help you there
    4. output to image/pdf
    You need to think about output quality, for instance if you have an A4 page you need to consider the scaling of the display object and the effect of pixelation, Usually if the images are a reasonable size they are displayed on the canvas scaled down when you want to create the output you would redraw the 'page' in a fullsize memory 'canvas' then output that. at 240dpi an A4 page would be about 2300x1800 pixels.
    If you need help with any of this let me know
    David

  • Is this possible with Actionscript 3 events?

    Fairly new to AS3. Studying up on events.
    Is it possible to have a simple value object dispatch an event and have the script inside the MXML respond to that event itself without having to register the event on the value object itself?
    Example of what I'm talking about
    I have a simple value object named Person. Not directly inherited from anything.
    Has one variable.  firstName : String;
    When the firstName variable gets changed, the setter creates a new DispatchEvent object and dispatches a new event. It does this without any runtime errors.  Back in the MXML, I want the MXML's Application to be what registers the event, NOT the Person object. In fact, it can't because I didn't inhert from the DispatchEvent class.
    I've provided both the custom class and the MXML. I've kept it as bare bones and as simplistic as possible to get my intent across.
    =======================================
    MY CUSTOM CLASS DEFINITION
    =======================================
    package myClasses
    import flash.events.Event;
    import flash.events.EventDispatcher;
    public class Person
      private var _firstName : String;
      public function Person( fName : String )
       _firstName = fName;
      [Bindable(event="firstNameChange")]
      public function get firstName():String
       return _firstName;
      public function set firstName(value:String):void
       if( _firstName !== value)
        _firstName = value;
        var d:EventDispatcher = new EventDispatcher( );
        d.dispatchEvent( new Event( "firstNameChange" ) );
    =======================================
    MY MXML
    =======================================
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
          creationComplete="application1_creationCompleteHandler(event)">
    <fx:Script>
      <![CDATA[
       import mx.controls.Alert;
       import mx.events.FlexEvent;
       import myClasses.Person;
       [Bindable]
       protected var myPerson:Person
       protected function application1_creationCompleteHandler(event:FlexEvent):void
         // Want the "application" to be notified when the "firstNameChange" event happens
        addEventListener( "firstNameChange", personChanged );
        myPerson = new Person( "Scoobie Do" );
        // Force a change and HOPE the event triggers
        myPerson.firstName = "Shaggy";
         // This is NOT being ran.
       protected function personChanged( e:Event ) : void
        Alert.show( "triggered" );
      ]]>
    </fx:Script>
    </s:Application>
    All the examples I've seen would have the Person class inherit from the DispatchEvent class, then back in the MXML you'd have something like this
    var p:Person = new Person( "thelma" );
    p.addEventListener( "firstNameChange", someEventHandlerFunction );
    I get that, but not what I'm trying to acheive here. I just want the Person object to dispatch the event and have someone else be able to listen for the "firstNameChange" event.   Is this possible?
    Thanks for the help!!!!

    Ahh, the age-old signals/slots vs Events debate...
    The fact there is even a discussion on the topic gives you an idea of how powerful the language is (compared to other sandboxed client-side instruction sets). Architecturally, anything is possible. Hell, you could even write your own byte code interpreter if you wanted...
    To get back to the original question, what you are looking for is a standardized way to get classes to communicate with each other, yes? This is usually done through a framework, or various design patterns. Pick whichever method your are comfortable with given your past programming experiences.

  • I have two separate itune accounts under two different email accounts and would like to combine them under one account.  Is this possible and if so, how do I do it?

    I have two separate itune accounts under two different email accounts and would like to combine them under one account.  Is this possible and if so, how do I do it?

    If you go to Settings > iTunes & AppStore , you can sign out from your account, and sign in with the one you've used to purchase apps.This will not remove any apps you already have on it.
    Then you can go to AppStore and download apps you've purchased (either via "Purchased" button in "Updates", or simply search for them and download them.
    That way you can have multiple accounts' apps on your iPad. When updating, you will be prompted for the credentials for account you've purchased given App with.

  • I work with a child who is not able to move his neck.  to see the ipad, it has to be placed high above the table (eye level).  he needs access with a mouse - is this possible?

    I work with a child who has physical disability and cannot move his neck.  The ipad needs to be eyelevel in order for him to see it, but he also is not able to raise his hand and would need mouse access...  is this possible?

    I'm sorry but the iPad does not work with a mouse, there is no cursor on the iPad and the iPad was designed as a touch screen device so a mouse will not work.
    I really don't know what to suggest other than this new device, and it might be worth a look. I assume that the child can use his hands for a keyboard.
    http://www.thinkgeek.com/product/e722/

  • Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    If you just installed iCloud does that mean you updated the iOS that's running on your iPad?  If so, you'll want to restore all the programs you have from the backup you hopefully made.
    Refer to these articles for help.
    iTunes: Backing up, updating, and restoring iOS software.
    If you don't want to use iCloud, simply don't activate it.
    You can also download the programs again.
    If you live in a country that supports re-downloading apps then you can re-download them.  You can refer to this article for more help.
    Downloading past purchases from the App Store and iTunes Store
    What to know if your country supports downloading past purchases?
    iTunes in the Cloud Availability

  • I am getting old and looking forward to use I Pad as a Phone if possible through WIFI! I this possible? The screen is to small for me! If possible, with new I Watch taking calls, other uses through I Pad!

    Like I wrote on title, I am getting old and it is not easy to see E-mails, news etc. on a I phone! New I phone will not help me for the size.
    If possible, everything without calls, I would like to use I Pad as direct unit, and for calls through I Pad over WIFI all calls. If a call as Skype, I would like
    to use the I Pad as a monitor. Is this possible?
    I found on a side that there is a product for people for better hearing, which can be put into the ears, using WIFI with I Phone.
    If this product could be used also for I Pad as a Phone for hearing, and the I watch or I Pad as Microphone, it will be great for old Mac users.
    Is this possible with our system know?
    I am using Mac since Classic II! Would like to continue with the newest items with the possibility for old person with bad Eyes or Ears.
    Looking forward for a kind answer
    with regards
    Christian an old Mac user!

    Definitely No

  • I have a Macbook Pro with OS 10.6.8 with no updates. Bundled is iPhoto 11, version 9.2.6. I would like to update my OS to 10.9.5 or later. Is this possible and which version is recommended?

    I have a MacBookPro with OS 10.6.8. It has no updates. This version contains Iphoto 11, version 9.2.3. I would like to upgrade my operating system to 10.9.5 or later. Is this possible and how best to proceed? How will this affect iPhoto?
    Thanks, Jeff

    If you have a mid/late 2007 MBP you can install the latest OSX that is available, on your MBP.  Mavericks (10.9) has been replaced by Yosemite (10.10) and is no longer available in the App store. 
    You choices are Lion (10.7), Mt.Lion (01.8) (both $20) or Yosemite (free).  The first two are available from the Apple online web site.  Yosemite can be downloaded from the App store.
    Ciao.

  • I just bought my macbook pro and it's charged up to 100% and is still plugged in but now shows the battery at 98%.  How is this possible when it's plugged in to the charger and the green light is on?

    I just bought my macbook pro and it's charged up to 100% and is still plugged in but now shows the battery at 98%.  How is this possible when it's plugged in to the charger and the green light is on?

    The system regularly lets the battery drop to about 95% when on the charger, then recharges to 100%.  This lets the batery exercise "just a little" all of the time and saves the recharge curcuits from overuse.
    Regualr occurence for me.
    Also ... you need to let your battery work at least once per month.  Let it run down to 40%, but not less if you can at all avoid it.  Running thr battery fully dead will shorten the battery life significantly.

  • Using one ipod on 2 computers - is this possible?!

    Hi guys I would really appreciate it if somebody could help out with this:
    I want to buy my girlfriend an 80gb Ipod Classic for xmas and load it with some music using my existing version of itunes (version 7.3.2.6) and then give it to her so that she can use the ipod with the verison of itunes that it comes with or she downloads. *This music will NOT be music purchased from itunes.*
    Is this possible? When her friend connects her new nano to my girlfriends pc and tries to use my girlfriends slightly older version of itunes all of the songs are greyed out and not useable.
    I do not want to buy the ipod and load it up only to find she can then not use it with her version of itunes.
    If anyone is certain about this i'd be greatly appreciative of an answer.
    David

    To change it back to automatically syncing you remove the check mark from "Manually manage songs and videos" and press Apply. If you don't want to use it as file storage device and want it to automatically eject when it is finished updating you also remove the check mark from "enable disk use" (this is checked by default when you set the iPod to update manually. Remember though that if you go back to updating automatically, any songs on the iPod that aren't in iTunes will be removed. You can't "sync" that is automatically update an iPod from multiple libraries or computers: Loading songs onto iPod automatically - Windows

  • How do I connect  Apple 20" Cinema Display to orignal MacBook Air which does not have a Fire-Wire port. Is this possible? Any advice would be appreciated. I have the Micro-DVI to DVI adapter. Norm

    I Wish to connect my 6 year old Apple 20" Cinema Display to an orignal MacBook Air which does not have a Fire-Wire port. Is this possible? Any advice would be appreciated. I have the Micro-DVI to DVI adapter. Norm

    The FireWire cable is just for the FireWire ports on the display.  The display will run without it.

  • I want to buy a Ipod Nano 16gb and it says it holds up to 4,000 songs, and 16 hours of video but on my Itunes I have 2,593 songs and it says I have 19.88 gb. How is this possible?

    I want to buy a Ipod Nano 16gb that says it holds up to 4,000 songs, 16 hours of video, and 14,000 pictures. On my Itunes Library, I have 2,593 songs and it says I have 19.88 gb just of songs. How is this possible? If I buy the Nano, will I not be able to have all my songs on the ipod? The music is my first and only prioarity. I want to be able to have up to at least 3,000 songs, even if that means not having video or pictures. Can someone please help me?

    Daniella04 wrote:
    I want to buy a Ipod Nano 16gb that says it holds up to 4,000 songs, 16 hours of video, and 14,000 pictures. On my Itunes Library, I have 2,593 songs and it says I have 19.88 gb just of songs. How is this possible? If I buy the Nano, will I not be able to have all my songs on the ipod? The music is my first and only prioarity. I want to be able to have up to at least 3,000 songs, even if that means not having video or pictures. Can someone please help me?
    Daniella,
    The estimated song capacities, such as 4000 songs in 16 GB, are based on 4 minute songs of 4 MB each, which is what you get at 128 encoding. 
    Most of us nowadays use well above 128.  (For example, the iTunes Store and Amazon MP3 both sell songs only in 256.)
    However, you can still make more songs fit!  When you sync your iPod, use the option to "convert higher bit rate songs," as pictured.  Choose 128.  This fits more on the iPod, but does not change the songs in your library.

  • I would like to access both my iTunes and my husbands iTunes on the same computer.  However, we still want our separate logins for our devices (iPad, 2 iPhones) for purchases.  Is this possible?

    Is there a way to have one computer hold both my iTunes account and my husbands iTunes account at the same time.  We do not want to log in and out, but want to be able to access both purchases on the same computer (songs, movies, etc).  However, we want to keep our accounts seperate for purchases on our devices.  Is this possible?

    How to use multiple iPods, iPads, or iPhones with one computer

  • There is no space to store video on my computer.  I am am looking at getting 1 terabyte on the cloud in hope i can edit video off of the cloud the same way I can with a hard drive.  Is this possible?

    There is no space to store video on my computer.  I am am looking at getting 1 terabyte on the cloud in hope i can edit video off of the cloud the same way I can with a hard drive.  Is this possible?

    Buy another hard drive.  They're cheap these days.
    In fact, buy a couple of 'em.  I recommend a minimum of five internal hard drives.
    C: Windows and Programs
    D: Project, graphic and audio files
    E: Cache and Scratch
    F: Media
    G: Export

  • HT204053 I have 4 iphones on the same Apple ID, but would like 4 different accounts and iCloud is this possible?

    I have 4 iphones on the same Apple ID, but would like 4 different accounts and iCloud is this possible?

    Create a new Apple ID for the one you want to change.

Maybe you are looking for

  • How to encrypt password with hash function in Java?

    Hello, everybody! I will need to store user passwords in a database, but for stronger security I want to store these passwords hashed, so I know I will need a column for the password and for the salt value. So, I'd like that you indicate me a very go

  • IPhoto quits unexpectedly within 60 seconds of app launch

    When I launch iPhoto, it quits unexpectedly within 60 seconds of launch. This problem first started after I downloaded the dotphoto plugin. I have read the posts on this forum and removed the dotphoto plugin without success. Other steps I have tried

  • Xmls in Form Builder

    Hello, I have created a form template using form template and I have created some contents using the form template. Now in the KM Content I am seeing the content created as an xml. But the actual content is all html tags. Some of the info like conten

  • Where can I find a download of 7.6.2 iTunes?

    I have a Powerbook that I'm running OS 10.3.9 and I need to get iTunes 7.6.2 which is suppose to be the latist version of iTunes that will run on OS 10.3.8.

  • OWB 10.2 is slow

    Has anyone noticed how the 10.2 version is much slower than 10.1? even deploying one object takes a while.