| Author |
What is the difference between a servlet class and a java class
|
Nishin Kareem
Greenhorn
Joined: Oct 12, 2012
Posts: 3
|
|
|
What is the difference between a servlet class and a java class. Please help me!
|
 |
dharmendra kumar Pandey
Greenhorn
Joined: Oct 12, 2012
Posts: 1
|
|
|
a servlet class too is a java class, the question should be what type of class is a servlet
|
 |
Nishin Kareem
Greenhorn
Joined: Oct 12, 2012
Posts: 3
|
|
|
question was like what is the difference between servlet and java class.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Welcome to CodeRanch Nishin Kareem and dharmendra !
-->Servlet is a java class which comply servlet specification, so that it can be run in a server. Java class not required to comply Java Servlet API. - putting this point awkwardly
some other rancher may help you better.
|
 |
Matthew Brown
Bartender
Joined: Apr 06, 2010
Posts: 3786
|
|
Hi Nishin and Dharmendra. Welcome to the Ranch!
A servlet class is just the same as any other Java class. As far as the language is concerned, it's not treated any differently.
The difference is what is done to them. A servlet container (e.g. Tomcat) is designed to be able to recognise servlet classes and, if configured correctly, treat them in a particular way. There's nothing magical about this - you can always write your own application that can treat any type of class in a specific way - but there's a standard that all servlet containers follow that means you can write a servlet class and know how it will be used.
|
 |
Nishin Kareem
Greenhorn
Joined: Oct 12, 2012
Posts: 3
|
|
|
Thanks a lot Matthew Brown/Seetharaman Venkatasamy.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Nishin Kareem wrote:Thanks a lot Matthew Brown/Seetharaman Venkatasamy.
You are welcome
|
 |
 |
|
|
subject: What is the difference between a servlet class and a java class
|
|
|