Flex DefaultButton skin issue

I have created a custom button skin,
and have set my css to use it for all spark buttons:
s|Button
skinClass: ClassReference('components.PinPointButtonSkin');
This works fine, except for when I assign one of these buttons to it's container's defaultButton:
defaultButton="{myButton}".
Then the skin does not get applied.
Please point me in the right direction of what I am missing.

Thanks for the reply.
I am unable to attach the project, so please find it here:
http://dl.dropbox.com/u/7241599/ButtonTest.fxp
Very odd behaviour.
The bottom button does not behave as a default button (pressing enter does not execute its click handler),
and if I click on the button manually, the skin disappears. Clicking on the top  button brings the skin back for the bottom button.
PS. In my project I took this code from the skin does not appear on defaultButtons at all.
Thanks for your help.

Similar Messages

  • Flex 4 skin question

    I am looking into Flex SDK skins and see a reference to hostComponent. What is it exactly for?

    The hostComponent attribute is a reference to the component instance that the skin is currently attached to. It is a convenient way to access properties or methods from the component.
    In general, you want to push data from the component to the skin. However, on occasion, you need to pull information from the component to the skin and hostComponent provides a way to do that.

  • Flex 4 skin  how to set tree control corner radius..?

    hi .,
         i have using flex4 mx tree control to reduce the corner radius.
    application using tree control code...
    <mx:Tree   contentBackgroundColor="#FFFFFF"  id="folderTree" labelField="documentFolderName" dataProvider="{folderTreeArray}" itemClick="clcikchanged(event)" height="650" borderColor="#FFFFFF">        </mx:Tree>
    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/halo";
        @namespace mx1 "library://ns.adobe.com/flex/mx";
         mx|Tree
        border-skin: ClassReference('com.istmanagement.skins.Application.boaderskin');
        </fx:Style>
    borderskin.mxml coding here...
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5">
        <fx:Metadata>
    [HostComponent("spark.components.BorderContainer")]
    </fx:Metadata>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
          <s:Rect id="background"  left="0" right="0" top="0" bottom="0" >
            <s:fill>
                <s:SolidColor id="bgFill" color="#FFFFFF"/>
            </s:fill>
        </s:Rect>
       <s:BorderContainer cornerRadius="8" width="255" height="650">
        </s:BorderContainer>
        <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
        </s:Group>
    </s:Skin>
    tree control corner radius is reduced to display., after i have using  <mx:HDividedBox > to drag this to override a tree control...
    how to solve this problem.,
    With Regards.,
    LinFlex-

    Did you every solve this issue?

  • Flex PHP Wizard Issues (Is Flex/PHP ready for prime time)

    I have been designing a website using Flex. I thought of using Flex form many reasons, but one was to reduce the number of languages used in the development process. I am going to be hosting at Godaddy so I thought  I would try PHP. I normally would use Java, but Flex seems to want Enterprise Beans and Java Remote Objects which cost to much and would probably not work on Godaddy. I started out with MAMP on a Apple computer and have design 60% of my application, when I started noticing as the database go larger, I started getting communication errors with the MAMP version of mysql. So I installed MySQL and and started using Apache and PHP that comes with OSX. The communication errors are increased.
    Any suggestions? I am at the point, if I can find a proven programmer, with GoDaddy/Flex/MySQL/PHP and Java experience to help answer some question, I think I can come up with contract dollars.
    First question is Flex ready? or is this an issue with PHP?

    have moved this thread from the ADDT forums to the Flex Data Services forums

  • Flex 4 Skinning and Control Resizing

    Hello, all
    I have recently taken a deep dive into skinning Flex components.  All in all, I'm very happy with the improvements that have been made and feel that it is a significant step in the right direction towards encouraging uniqueness among Flex applications in the enterprise.
    I have a solid handle on skinning with Flex 4 and how to leverage it but what I don't understand revolves around resizing skinned components.  As an example, let's assume I open up Photoshop and navigate to Scripts==>New Flex Skin... and then chose the ComboBox component to skin.  Let's then say that I update each of the four states of this control to look differently.  Lastly, I then export the skin from Photoshop and import it into Flash Builder 4 and apply my new style to a combo box I've dropped on my canvas.  Everything appears well - until I resize the component.  This causes the skin the ComboBox is using to visually stretch (as would be expected with the visual representation of a control being a static, embedded image).
    My question is as follows:
    - Is there any good way to properly handle control resizing with custom skins such that the skins don't appear stretched?
    I'm hoping there is something I am missing here.  I am aware that, as an alternative to importing a custom skin image, you can use the vector art capabilities of FXG in an MXML file to do the skinning there but I'd really like to avoid having to code a custom skin when I could leverage a tool such as Illustrator or Photoshop to make it look exactly how I want.

    Hi,
    You could use Nine slice scaling of embedded assets. Search for that in this page
    http://livedocs.adobe.com/flex/3/html/help.html?content=embed_4.html#186094
    Do let me know if that solves your problem.
    Nishad

  • Flex swf cache issue in IE

    Hi,
    We are facing an important issue with the IE cache of the swf file. Could you please help us?
    For example, we built and put calendar.html & calendar.swf on server. We don't want users to download a 800 KB large swf file everytime when they access the web page, especially at a lower speed of network. However, although we coded some IE cache setting in calendar.html, like response.setHeader("Cache-Control" ...., IE still download the file from server sometimes instead of using the local one in cache.
    One of reasons is the cache size. If you set the size to 50 MB by default, it will be full very soon after you view some websites. Then IE will clean part of the cache. The cached swf file might be cleaned, or might not be. We never know. If it's cleaned and you access calendar.html, you will found out IE downloads the file again from server. To avoid this, users can enlarge the cache size, but the downloading still happen sometimes. Also, letting user enlarge the cache may not be a good and final solution.
    We want to force IE to use the local file everytime. If we updated the file, we want IE to download it in this case, and download it only once.
    So, we want to ask if you also have faced this kind of issue and how you did it? Please follow this topic or anyone is welcomed to send an email to me at [email protected]
    Thank you very much.

    Hmmm
    Not sure about this one.  However to reduce download time have you tried using Runtime Shared Libraries.  This allows the Flash Player to cache the Flex Framework.  This means the first time someone gets a flex app it will take a bit longer to load, but it will cache the framework, then next time the load is quicker.
    Its the Flash Player that caches the frameowrk also, so the browser can;t clear it.
    That might help
    Andrew

  • Media Skin issue

    Help...
    I managed to figure out how to create a nice media skin with no thanks to the incomplete and confusing instructions on the Apple Quicktime tutorial, but with many thanks to kkirkster's website and a few others.
    I am, however having an issue with the movie I created.
    It plays perfectly. I mean, absolutely perfectly- on my computer.
    If, however, I send the self-contained final version over to either of the other 2 computers in the office, the skin won't work right. It has an opaque box around it, where the OS is drawing the drop shadow. The skin is working, in a sense, because the transparent areas inside the box are still transparent, and the movie plays correctly.
    It boggles my mind that it plays perfectly on my computer and not on the other computers, and I'm beginning to wonder if there isn't some issue with QT not actually saving the movie as a complete "Self Contained Movie" and is still referring to the files from the XML file.
    Any help or experience with this issue would be greatly appreciated.
    Mike Vogel
    Des Moines, IA

    Ok, this has worked for us... sort of.
    If you're willing to look at this a little more for us-
    We've got it to work perfectly in Safari only. All other browsers don't see the files.
    I've copied the code from our web guy that's based on your website below:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta name="generator" content="Adobe GoLive" />
    <title>Untitled Page</title>
    </head>
    <body><hr>
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="400" width="500">
    <param name="SRC" value="file:///Graphics/Professional%20Video%20Web%20Site/Professional%20Video/ PV%20WEB%20VIDS/PVCommPoster.mov" />
    <param name="Target" value="quicktimeplayer"
    <param name="href" value="file:///Graphics/Professional Video Web Site/Professional Video/PV WEB VIDS/PVComm.mov"
    <param name="controller" value="false" />
    <embed height="400" pluginspage="http://www.apple.com/quicktime/download/" src="file:///Graphics/Professional%20Video%20Web%20Site/Professional%20Video/PV %20WEB%20VIDS/PVCommPoster.mov" width="500" controller="false" href="file:///Graphics/Professional Video Web Site/Professional Video/PV WEB VIDS/PVComm.mov" TARGET="quicktimeplayer"></embed>
    </object>
    </body>
    </html>
    Is there anything here which stands out as wrong.
    The website isn't uploaded currently- only on the HD and being created in GoLive.
    Thanks a ton for your help!
    Mike Vogel

  • Flex Builder 3 Issues

    I apologize in advance for my cynicism, but since I received
    cricket sounds from Adobe Support I figured I would give this a go.
    I downloaded and installed the trial version of Flex Builder 3, but
    when trying to click on any of the links in the start page
    (tutorials, etc..) it displays the following error: Windows - No
    Disk
    Then it requires me to kill both the FlexBuilder.exe and the
    associated javaw.exe using task manager to get rid of the error. I
    found a similar issue in the knowledge base, but it was for people
    who installed from a DVD on Vista.
    I installed to the default location on XP SP2, with all the
    latest patches. I've un-installed/reinstalled like the knowledge
    base entry states as the solution, but to no avail.
    If anyone can provide insight or a solution, I would
    appreciate it!
    Thanks in advance,
    Rob

    I am not sure if this would work but worth a try.
    1. Try to launch your flex builder with -clean. (Using
    Command line)
    Go to Program Files-> Adobe->Flex Builder 3
    Run Flexbuilder.exe -clean
    Also if it doesn't work try reinstall but after uninstalling
    make sure Program Files-> Adobe->Flex Builder 3 is empty.
    Also please log a bug at
    http://bugs.adobe.com/flex
    HTH,
    Gaurav

  • Flex 15 brightness issue.

    After upgrade the latest Windows 8.1 update (End Apr), the brightness adjustment are not function any more.
    The brightness key at the keyboard and setting in the windows also not working.
    Kindly help to solve this issue. 
    Thanks

    Have you updated all your drivers after upgrading to Windows 8.1?
    You can find drivers for your model here: http://mobilesupport.lenovo.com/us/en/products/laptops-and-netbooks/flex-series/ideapad-flex-15-note...
    Jonas
    Microsoft MVP: Windows Consumer Expert
    Yoga Tablet 2 10 || ThinkPad X1 Carbon (20A7007MPH) || ThinkPad Helix (3698-6EU) || IdeaCentre B540
    Twitter: @jonashendrickx

  • FLEX Flashpaper sizing issue

    I have down loaded the demo of Flashpaper2 and am able to
    convert pdf documents to SWF. When I convert a pdf document that is
    8.5 x 11 then load it into FLEX the initial size of the swf opened
    in FLEX is not taking up the same size every time. I tried to
    resize it with benSum.setSize(h,w) but it still does not work
    correctly.
    code example:
    <mx:VBox id="flashPaper"
    label="{ewn.planDetails.benefitSummaryTitle}" height="100%"
    width="100%" hScrollPolicy="off" vScrollPolicy="off">
    <mx:VBox width="100%">
    <mx:HBox creationComplete="loadBenSum()">
    <mx:Loader id="benSum" autoLoad="false"
    scaleContent="true"/>
    </mx:HBox>
    </mx:VBox>
    </mx:VBox>
    benSum.setSize(3000,3000);
    One of the SWF displays the correct size then the next does
    not. Is there a way to define the size of the swf?

    well i dont knoe exactly whether the size of swf's can be
    resized,,
    but definately size of flashpaper can be done..
    see the part of the code am posting below, u might get some
    logic for ur program.
    its about a issue with loading a swf in flex with the
    <mx:Loader> tag.
    Loading ColdFusion Generated Flash Paper into a Flex
    application.
    All you realy have to do is to pass the coldfusion page on
    the contentPath on the <mx:Loader> tag like this
    <mx:Loader id="myLoader1" contentPath="
    http://localhost/cfdocexample.cfm"/>
    The left hand panel is calling a cfdocument while the right
    hand panel is calling a cfreport
    One note however, you cannot use the print functionality at
    the moment.
    code part (flashpaperTest.mxml)
    <mx:Application xmlns:mx="
    http://www.macromedia.com/2003/mxml"
    xmlns="*" creationComplete="resizeFlashPapers()">
    <mx:Script>
    <![CDATA[
    function resizeFlashPapers()
    resizeFlashPaper1();
    resizeFlashPaper2();
    function resizeFlashPaper1()
    var flashPaper1 = myLoader1.content.getIFlashPaper();
    if (flashPaper1 == undefined ||
    flashPaper1.setSize("480","500") == false)
    doLater(this, "resizeFlashPaper1");
    function resizeFlashPaper2()
    var flashPaper2 = myLoader2.content.getIFlashPaper();
    if (flashPaper2 == undefined ||
    flashPaper2.setSize("480","500") == false)
    doLater(this, "resizeFlashPaper2");
    ]]>
    </mx:Script>
    <mx:HDividedBox width="100%" height="100%" >
    <mx
    anel id="panel1" title="Flash Paper through
    cfdocument" width="50%" height="100%" >
    <mx:Loader id="myLoader1" contentPath="
    http://localhost/cfdocexample.cfm"/>
    </mx
    anel>
    <mx
    anel id="panel2" title="Flash Paper through cfreport"
    width="50%" height="100%" >
    <mx:Loader id="myLoader2" contentPath="
    http://localhost/cfrepexample.cfm"/>
    </mx
    anel>
    </mx:HDividedBox>
    </mx:Application>
    --------------------

  • Flex Code Behind Issue

    Hey guys,
    so I have created a simple flex proj
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" themeColor="#0EFF02">
    <mx:Script>
    <![CDATA[
    private function onOver(evt:Event):void{
    trace("onOver : " +evt.currentTarget );
    test.setStyle("backgroundColor",0xff00ff);
    private function onOut(evt:Event):void{
    trace("onOut : " +evt.currentTarget );
    test.setStyle("backgroundColor",0xffff00);
    ]]>
    </mx:Script>
    <mx:Canvas id="test" x="118" y="136" width="443"
    height="133" themeColor="#099FFF" backgroundColor="#D70000"
    rollOver="onOver(event);" rollOut="onOut(event);">
    <mx:Button x="39" y="35" label="Button"/>
    </mx:Canvas>
    </mx:Application>
    So basically all the code above does is changes the
    backgroundColor of the Canvas. It works fine
    Now if I make a MXML Component using the Code Behind Method
    Main.mxml
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" themeColor="#0EFF02" xmlns:ns1="item.*">
    <ns1:ListItem x="80" y="48"/>
    </mx:Application>
    ListItem.mxml
    <item:CListItem xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300" xmlns:item="item.*">
    <mx:Button x="65" y="61" label="Button"/>
    </item:CListItem>
    CListItem.as
    package item
    import flash.events.MouseEvent;
    import mx.containers.Canvas;
    import mx.events.FlexEvent;
    public class CListItem extends Canvas
    public function CListItem()
    super();
    this.addEventListener(FlexEvent.CREATION_COMPLETE,
    onComponentLoaded);
    private function onMouseOver(evt:MouseEvent):void{
    trace("CListItem.onMouseOver :");
    this.setStyle("backgroundColor",0xff00ff);
    private function onMouseOut(evt:MouseEvent):void{
    trace("CListItem.onMouseOut");
    this.setStyle("backgroundColor",0xffff00);
    private function onComponentLoaded(evt:FlexEvent):void{
    this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
    this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
    Now when I mouse over the Button component the onMouseOut
    function gets called and there is a flicker in the backgroundColor.
    If I dont use the Code Behind Method then the onMouseOut
    function does not get called when I rollOver the button.
    Can anyone explain this strange behavior?
    Thanks
    Cheers
    Firdosh

    Conrad - there's no plans to enhance specific codebehind support.  It's worth mentioning, however, that you can adopt the spark skinning model for all of your components to get a good codebehind separation of view and logic.
    Ely.

  • Flex/Spring UserDetailsService issue

    I'm fairly new to both Flex and Spring.  I can get them to communicate and have no issues there, I can even authenticate a user from lines in my database.  I've implemented my own UserDetailsService which returns my own custom UserDetails object with some extra user information in it.  This is where my problem is.
    I need to login with more information than just a username and password.  I need to also check to make sure that they also put in the proper first name and last name.  I can't seem to figure out where to validate that.  I'm doing the standard:
    ro.channelSet.login(number.text, password.text)
    but I can't pass anything else into it.
    Any suggestions?

    This can be done by using <mx:Reparent/> tag.

  • Flex TextArea HTMLText issue.

    Hi All,
             I am using a Flex textArea control and recently i found an interesting behaviour while using htmlText property of the TextArea.
    By default the htmlText has "<P align=''left' /> tag.When i added bullets to the text it adds the "<LI>" tag to the text and get rid of the the "<P/>" tag.
    The problem is that,when i add bullets and the right align the text,it displays fine on the textArea ,but since the htmlText does not have the "<P/>" tag,when i send the htmlText to the backend to generate the .jpg preview of the screen,it is not aligning the text to right.
    Bottom line:"when text right aligned with bullets,htmlText does not have "<P/>" tag and only have "<LI/>" tag.
    Does anyone know about this issue?
    Any ideas to overcome this issue?
    Thanks
    Kartik B

    Thanks for reply,
    i am taking htmlText from another textarea..
    code:
    var htmltext:String = txtarea.htmlText
    var textarea1:TextArea = new TextArea();
    textarea1.htmlText = htmltext;
    vboxName.addChildAt(textarea1,0);
    while tracing value of htmltext
    <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="11" COLOR="#000101"
    LETTERSPACING="0" KERNING="0">agenda descriptyion</FONT></P></TEXTFORMAT>
    <TEXTFORMAT LEADING="2"><LI><FONT FACE="Verdana" SIZE="11" COLOR="#000101"
    LETTERSPACING="0" KERNING="0">neethu<FONT FACE="none" COLOR="#FFFFFF"></FONT></FONT></LI></TEXTFORMAT>
    Regards,
    Manu Lal

  • First Flex Project - Skinning Component?

    I am working on my first flex project for the college that I work for.  We are making a large touch screen into a display for all of the awards that we have given out over the years and taking the old plaques off the walls.
    I want to iterate over a list of names and years that the awards were given so that each instance of the award looks like it is on it's own little plate.  I'm just imitating the plaques that were on the wall that had a big discription and name of the plaque on one plate and all the winners of the award on their own little plates beneath it.
    Is this what I would a component skin for?  I'm sorry if this is to much of a newbie question.

    Very cool indeed.
    I added it to my ChikaraDev directory of rich internet
    applications:
    ChikaraDev
    Directory of Rich Internet Applications
    It could use a progress bar though. The screen where it will
    appear is blank till it loads. But very nice use of Flex!

  • Flex file upload issue with large image files

         Hello, I have created a sample flex application to upload an image and also created java servlet to upload and save image and deployed in local tomcat server. I am testing the application in LAN. I am able to upload small as well as large image file(1Mb) from some PCs but in some other PCs I am getting IOError while uploading large image files however it is working fine for small images. Image uploading is hanging after 10%-20% and throwing IOError. *Surprizgly it is working Ok with XP systems and causeing issues with Windows7 systems*.
    Plz give me any idea to get a solution.
    In Tomcat server side it is giving following error:
    request: org.apache.catalina.connector.RequestFacade@c19694
    org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:371)
            at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.ja va:126)
            at flex.servlets.UploadImage.doPost(UploadImage.java:47)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProto col.java:594)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStre am.java:982)
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:8 86)
            at java.io.InputStream.read(InputStream.java:101)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:96)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:66)
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:366)
    UploadImage.java:
    package flex.servlets;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    import java.util.regex.*;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UploadImage extends HttpServlet{
             * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
             *      response)
            protected void doGet(HttpServletRequest request,
                            HttpServletResponse response) throws ServletException, IOException {
                    // TODO Auto-generated method stub
                    doPost(request, response);
            public void doPost(HttpServletRequest request,
                            HttpServletResponse response)
            throws ServletException, IOException {
                    PrintWriter out = response.getWriter();
                    boolean isMultipart = ServletFileUpload.isMultipartContent(
                                    request);
                    System.out.println("request: "+request);
                    if (!isMultipart) {
                            System.out.println("File Not Uploaded");
                    } else {
                            FileItemFactory factory = new DiskFileItemFactory();
                            ServletFileUpload upload = new ServletFileUpload(factory);
                            List items = null;
                            try {
                                    items = upload.parseRequest(request);
                                    System.out.println("items: "+items);
                            } catch (FileUploadException e) {
                                    e.printStackTrace();
                            Iterator itr = items.iterator();
                            while (itr.hasNext()) {
                                    FileItem item = (FileItem) itr.next();
                                    if (item.isFormField()){
                                            String name = item.getFieldName();
                                            System.out.println("name: "+name);
                                            String value = item.getString();
                                            System.out.println("value: "+value);
                                    } else {
                                            try {
                                                    String itemName = item.getName();
                                                    Random generator = new Random();
                                                    int r = Math.abs(generator.nextInt());
                                                    String reg = "[.*]";
                                                    String replacingtext = "";
                                                    System.out.println("Text before replacing is:-" +
                                                                    itemName);
                                                    Pattern pattern = Pattern.compile(reg);
                                                    Matcher matcher = pattern.matcher(itemName);
                                                    StringBuffer buffer = new StringBuffer();
                                                    while (matcher.find()) {
                                                            matcher.appendReplacement(buffer, replacingtext);
                                                    int IndexOf = itemName.indexOf(".");
                                                    String domainName = itemName.substring(IndexOf);
                                                    System.out.println("domainName: "+domainName);
                                                    String finalimage = buffer.toString()+"_"+r+domainName;
                                                    System.out.println("Final Image==="+finalimage);
                                                    File savedFile = new File(getServletContext().getRealPath("assets/images/")+"/LowesFloorPlan.png");
                                                    //File savedFile = new File("D:/apache-tomcat-6.0.35/webapps/ROOT/example/"+"\\test.jpeg");
                                                    item.write(savedFile);
                                                    out.println("<html>");
                                                    out.println("<body>");
                                                    out.println("<table><tr><td>");
                                                    out.println("");
                                                    out.println("</td></tr></table>");
                                                    try {
                                                            out.println("image inserted successfully");
                                                            out.println("</body>");
                                                            out.println("</html>");  
                                                    } catch (Exception e) {
                                                            System.out.println(e.getMessage());
                                                    } finally {
                                            } catch (Exception e) {
                                                    e.printStackTrace();

    It is only coming in Windows 7 systems and the root of this problem is SSL certificate.
    Workaround for this:
    Open application in IE and click on certificate error link at address bar . Click install certificate and you are done..
    happy programming.
    Thanks
    DevSachin

Maybe you are looking for