This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet object?" Watch "servlet object?" New topic
Author

servlet object?

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

Can we create object of servlet? Can we create array of that objects like array of objects?
I try to search first, try my best for solving this query! but i didn't get answer by own. I didn't find this subject in any forum also,( i get 1st question but no answer written, but no one ask 2nd question).


Millions saw the apple fall, but Newton asked why.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

The direct answer is yes, you can treat servlets like any other Java class.

The real answer is "Why do you want to do that?" Once you make a servlet yourself, it no longer can act like a servlet because the container doesn't have control over it.

So, What do you you REALLY want to do? Why would you want an array of your Servlet type?


Steve
 
 
subject: servlet object?
 
Similar Threads
PriorityQueue Problem
A doubt on Arrays and Constructors
Casting Object[] into String[]
How to check whether a number is in Arraylist or not ?
Invoke servlet from servlet