Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

From HTTP text to Web Server Object: Conversion process

 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a sequence diagram in the servlet framwork where I can this flow the class/module/component involve in this conversion process?
or text-based explaination. 1M Thanks.

For example: Contact Form Data on client to Contact Object on server side.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet API performs no conversion into objects on the server side - form data as handled by the servlet API consists of strings, for the most part. Are you asking about a particular web framework that hands you an object?
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(first thing first: always good to hear from you! My question is like Back to the Future or rather back to the basic :-D)

Let's say, Contact has 2 fields: First and Last.

When the server receive a POST, there is a servlet POST method
where I extract the data as:

Contact c=new Contact(request.getParameter("First"), request.getParameter("Last");

Who create the request object and put the value of First into the request object so that it's
available to the user/developer?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet container, Tomcat or something like it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic