• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why creating an Object of an servlet and calling it isn't possible

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Assume that i have two servlets in my Container , namely First and Second Servlet .

For example



Why isn't it allows to create an Object for a Servlet in Secons and call it for example inside my First Servlet



}
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would this possibly achieve ?
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what you mean by "allowed". It's perfectly possible to do this, but will most likely not achieve what you intend to achieve.

Read up on the servlet life cycle to understand how servlets work.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but will most likely not achieve what you intend to achieve.


could anybody tell me the reason why is this like that .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea. What is is you are trying to achieve?
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you apparently do not understand the servlet life cycle. Which books/articles/tutorials have you read about that? If the answer is "none", start by doing that. If the answer is something other than "none", the follow-up question is "what did or did you not understand about what you read?".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic