Java servlets

Can i run it in eclipse by adding some libraries without a Apache Tomcat.Because i downloaded JSDK and in bin i didnt find servlet runner utility
[152 byte] By [aramakria] at [2007-11-27 5:47:07]
# 1
No. By definition, a servlet needs to be contained in a servlet container
georgemca at 2007-7-12 15:31:10 > top of Java-index,Java Essentials,New To Java...
# 2
what is a servlet container
aramakria at 2007-7-12 15:31:10 > top of Java-index,Java Essentials,New To Java...
# 3
> what is a servlet containerWhy are you writing servlets if you don't know that?
georgemca at 2007-7-12 15:31:10 > top of Java-index,Java Essentials,New To Java...
# 4

> 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

Mostafa.Hashema at 2007-7-12 15:31:10 > top of Java-index,Java Essentials,New To Java...
# 5

> > 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!

georgemca at 2007-7-12 15:31:10 > top of Java-index,Java Essentials,New To Java...