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 9065227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:26:57+00:00 2026-06-16T16:26:57+00:00

I want to first say that I am a newbie to Android and java

  • 0

I want to first say that I am a newbie to Android and java (to a lesser extent). I have a client-server application, the client is an Android app and the server is running Tomcat. Considering I am new at this I am a little confused about the POST request. The Client has a couple text fields, the user enters information and hits a button that calls on a method that well does a POST task. I can see that the server receives the data from the POST form in the client but my question is where does that information (from the form) go? It is supposed to create a new resource (in this case a Person resource)…Here is the code from the PersonResource class that does the POST.

@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
public Person postPerson(MultivaluedMap<String, String> personParams) {
    String firstName = personParams.getFirst(FIRST_NAME);
    String lastName = personParams.getFirst(LAST_NAME);
    String email = personParams.getFirst(EMAIL);

    System.out.println ("System storing: " + firstName + " " + lastName + " " + email);

    person.setFirstName(firstName);
    person.setLastName(lastName);
    person.setEmail(email);

    System.out.println ("person info: " + person.getFirstName() + " " + person.getLastName() + " " + person.getEmail() + " " + person.getId());

    return person;
}

It returns a person resource but ultimately where does that person resource go? I am sorry if I have not provided all required information needed to solve this problem. If more information is needed I will be happy to provide it. I truly appreciate any help given. Thank you.

  • 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-16T16:26:59+00:00Added an answer on June 16, 2026 at 4:26 pm

    I am not sure I fully understand the question, but here is an overview that might be helpful:

    The client POST sends an HTTP request to the server. The server must have some sort of web service framework (e.g. Jersey or CXF or …) that processes the request. The JAX-RS annotations on your class (@POST and @Consume), instruct the web service framework to route the request to the postPerson method of your class. It sounds like this much is working, yes?

    Your method then constructs a Person object based upon the contents of the form, i.e. the user input. Your method returns this Person to the web service framework.

    So what happens to this person? The @Produces annotation you have provided, instructs the web service framework to generate a JSON representation of the person and include this in the body of the HTTP response that is sent back to the client. The response might look something like this:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    Content-Length: 259
    {"fistName":"Bob", "lastName":"Barker", "email":"bob_bark@priceisright.com"}
    

    Is this what you were looking for?

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

Sidebar

Related Questions

First of all i want to say that i have searched each and every
First I want to say that I have looked at stackoverflow and highcharts forum,
so first off, I want to say that this question: Bundle framework with application
First I want to say that, I have a vector which has thousand of
At first I want to say that i am new in iPhone application development.I
First of all i want to say that I'm still a beginner in ASP.NET
First thing i want to say that it's not an easy question to explain,
First off I want to say that I am not using threads or multiple
Let’s say that my string is: test! I want to get the first character
First, I just want to say that the stackoverflow community is empowering to say

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.