aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubts in Web Container concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubts in Web Container concept" Watch "Doubts in Web Container concept" New topic
Author

Doubts in Web Container concept

kalle suresh
Ranch Hand

Joined: Nov 20, 2007
Posts: 48
I have one quick question on Container concept. On page 42 (HeadFirst Servlets & JSP book), talking about containers it was written like, once the request comes from the client container creates a HttpServletRequest and HttpServletResponse objects and those acts as a reference for the clients request and response. After that container creates a thread for that servlet and passes these request and response objects to the thread and calls the service method. Here i'm not able to understand who will call the threads start method and what will be the code in the created thread's run() method .

Code example for that thread class will be very helpful.
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

Container calls the thread start method.
kalle suresh
Ranch Hand

Joined: Nov 20, 2007
Posts: 48
What could be the code in created thread's run method.how it is interlinked with service() method
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

There is a very recent similar topic here:
http://www.coderanch.com/t/176083/java-Web-Component-SCWCD/certification/Thread-ll-Created-Run-but

The most important thing is that you don't have to worry about how it's done. That's the beauty of having the container - some of the work is already done for you and you don't have to care how it works internally. You only need to know how it works on the surface and how to interact with it.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubts in Web Container concept
 
Similar Threads
Clarification required on Request and Response object being availabe for Garbage Collection
How does servlet stay active ?
Multithreading in servlet
Request attributes within a servlet
Using interface reference variable without instantiation