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

  • SEARCH
  • Home
  • 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 8061655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:24:36+00:00 2026-06-05T10:24:36+00:00

I want to know or some code sample which will help me to send

  • 0

I want to know or some code sample which will help me to send the file and the hashmap to the server.

to upload a file to GWt server i use formpanel and a HttpServlet.
this is working fine.

i have a hashmap

    private static Map<String, List<Customproperties>> docClass =
 new HashMap<String, List<Customproperties>>();

which holds the property of document according to its classname.

I know how to do with RPC. but i want to do with servlet.As i have to upload a file which i have done with servlet. And every Hashmap is related to file .and this file with its property(in HashMap) will send to external repository.

Please 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-05T10:24:38+00:00Added an answer on June 5, 2026 at 10:24 am

    There are 2 ways to convert a hashmap to a string (and convert it back to a hashmap)

    1: Convert it using JSON library http://json-lib.sourceforge.net/ This will allow you to convert any java object to a JSON string so you can transfer it anywhere. And using the same library or another JSON library, can convert it back to a Java object.

    2: Convert it to an XML string using a library called XStream http://x-stream.github.io/ This will convert any Java object into a String represented as XML.

    I would recommend to convert your Objects to JSON strings because you are using GWT and it has a lot of support for JSON. And JSON is a good format for Webapps. Another advantage is that other languages can convert your JSON string into an object too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a Java code, which will send a simple text file
I want to know the meaning of the code \. I have seen some
I need some comments on the code that I assembled. I want to know
I want to know if Netbeans has some option or setting that will allow
I have a postgres database that I want to know some quick stats. For
I have a treeView , and i want to know if some node can
I'm a total newbie and want to start with php. I know some javascript
Want to know ways to store OBJECTS of a Class in some persistent storage.
I want to know how to add some sort of emblem or badge to
I've got some questions regarding Java design patterns. I want to know what the

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.