> what is a servlet container
Hello,
the servlet container is a java application that listen to request comes to specific port and then run the suitable servlet for that request.
the java servlet is a java class written in a specific way to make the servlet container able to run it and get response to the one who sent the request.
just like you do with normal java class you must create a public static main() method to allow the JVM to be able to run it.but the normal JVM is not able to run the Servlet because it use and extends Classes not coming with the sdk and the JVM don't know how to run it.
about using eclipse to run your servlet:
you may download some eclipse plugins that will help you to run the servlet container from the eclipse and lunch your servlet on this container all this from your IDE, but after install some plugins.
regards
mostafa hashem
> > what is a servlet container
>
> Hello,
>
> the servlet container is a java application that
> listen to request comes to specific port and then run
> the suitable servlet for that request.
>
> the java servlet is a java class written in a
> specific way to make the servlet container able to
> run it and get response to the one who sent the
> request.
>
> just like you do with normal java class you must
> create a public static main() method to allow the JVM
> to be able to run it.but the normal JVM is not able
> to run the Servlet because it use and extends Classes
> not coming with the sdk and the JVM don't know how to
> run it.
A servlet doesn't need a main method. A "normal" JVM is what runs a servlet container, if that container is implemented in Java. The JVM will be able to run servlets if the servlet API is on it's classpath, which presumably will be the case when running a servlet engine
>
> about using eclipse to run your servlet:
> you may download some eclipse plugins that will help
> you to run the servlet container from the eclipse
> and lunch your servlet on this container all this
> from your IDE, but after install some plugins.
But you will still need to install a servlet container. And if you're this much of a servlet beginner, I'd urge you not to use an IDE for this. As soon as something doesn't quite work - which it won't - you'll be having a terrible time tracking it down. Walk before you can run!