File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes servlet object creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet object creation" Watch "servlet object creation" New topic
Author

servlet object creation

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
hai,

the process inside a container is one servlet-multiple threads(requests), that is no matter how many requests are made,only one servlet object is created. does this applies to all classes, such as servlets generated from a jsp, models(POJC,EJB), that we use in our web application.

have a nice day
krishna prasad


have a great day,
krishna prasad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61233
    
  66

No, servlets created by the container follow the rules that the container applies. Objects that you create in your own code follow the rules that you apply.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
i have a servlet which is called upon by a request. servlet creates an object of a model that interacts with the database. so number of Model objects created is equal to the number of requests received, but the servelt is one and only one. is that right?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

yes


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet object creation