Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8065631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:43:46+00:00 2026-06-05T11:43:46+00:00

Hi i am using GWT to send a file using a servlet. Initially iwas

  • 0

Hi i am using GWT to send a file using a servlet.

Initially iwas trying to send only file to server. That was working fine.

Now in af ormPanel I added 3 Listbox.

private ListBox propertyNamelist = getListBox("propertyName");
    private ListBox propertyTypeList = getListBox("propertyType");
    private ListBox propertyValueList = getListBox("propertyValue");

private ListBox getListBox(String name){

            listbox = new ListBox();
            listbox.setName(name);

        return listbox;
    }

it is then added to FormPanel.

formPanel.setWidget(propertyNamelist);
formPanel.setWidget(propertyTypeList);
formPanel.setWidget(propertyValueList);
formPanel.submit();

On the Server side.

try {

        ServletFileUpload upload = new ServletFileUpload();

        FileItemIterator iterator = upload.getItemIterator(request);
        while (iterator.hasNext()) {
            FileItemStream item = iterator.next();
             stream = item.openStream();

            if (item.isFormField()) {
                log.warning("Got a form field: " + item.getFieldName());
                System.out.println(" chk fg " +item.getFieldName() +"  =  "+ Streams.asString(item.openStream()));


            } else {

                log.warning("Got an uploaded file: " + item.getFieldName()
                        + ", name = " + item.getName());
                fileName = item.getName();
                mimetype = item.getContentType();

            }
        }

    }catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

Output :

WARNING: Got a form field: propertyValue
Jun 11, 2012 11:37:55 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /UploadFileServlet: org.apache.commons.fileupload.FileItemStream$ItemSkippedException
 chk fg propertyValue  =  motivation

according to me motivation is a first value of listbox PropertyValue, where as there are more values in list box.

And there are more list box which should be displayed.

I am not able to understand y this is happening.

Note : I cant send Listbox through RPC cause these list box is related to file which is to send to server and server to external repository.

Some one plz Help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:43:48+00:00Added an answer on June 5, 2026 at 11:43 am

    As its name imply setWidget on FormPanel replaces the content of the FormPanel widget.

    You want to put several widgets inside your FormPanel, so use an intermediary container (such as a FlowPanel) to put your widgets in:

    // put all widgets together in some container (you can have a more complex layout)
    FlowPanel container = new FlowPanel();
    container.add(fileUpload);
    container.add(propertyNameList);
    container.add(propertyTypeList);
    container.add(propertyValueList);
    
    // set the container as the content of the form, so named form widgets will get
    // their value sent to the server.
    formPanel.setWidget(container);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using GWT (currenly working with google's eclipse plugin), and I'm trying to throw
I've been using GWT for quite some time now and have only used the
While developing an application using gwt in ecliplse crashed. Now the server is running
We're using GWT Atmosphere to send strings from the server to the client and
I'm using GWT RPC to send a string containing a date from the client
I'm programming using GWT, which includes Jetty. I have defined my own servlet and
I am using GWT 2.03 and am have an image that I want to
How can i send an Array with a HTTP Get request? I'm Using GWT
I'm using GWT on the client (browser) and Joda Time on the server. I'd
I send timestamps to my GWT client using GMT/Zulu time, with each string designated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.