why can't we initializa the fields in a constructor in the servlet?
satish.paluvai -1 Light Poster
Recommended Answers
Jump to PostWhat exactly are you trying to do, and what error messages / unwanted effects are you getting / seeing?
The code in question would help, alot.
Jump to Postnever assume a servlet's constructor will be called.
In fact unless it's a no-args constructor it's guaranteed to not be called!Typically a servlet is instantiated once, when it is first needed, per member of a cluster (which means once for most people, as most people don't run their …
All 6 Replies
masijade 1,351 Industrious Poster Team Colleague Featured Poster
jwenting 1,889 duckman Team Colleague
satish.paluvai -1 Light Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
jwenting 1,889 duckman Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.