wood burning stoves*
The moose likes Servlets and the fly likes From HTTP text to Web Server Object: Conversion process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "From HTTP text to Web Server Object: Conversion process" Watch "From HTTP text to Web Server Object: Conversion process" New topic
Author

From HTTP text to Web Server Object: Conversion process

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 461
    
    4
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
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
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?


Ping & DNS - my free Android networking tools app
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 461
    
    4
(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
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
The servlet container, Tomcat or something like it.
 
wood burning stoves
 
subject: From HTTP text to Web Server Object: Conversion process