tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hassan Schroeder" <hassan.schroe...@gmail.com>
Subject Re: javax.servlet.ServletException: Cannot allocate servlet instancefor path /servlet/HelloWorld (repost I don't resolve the problem with your reply)
Date Thu, 02 Aug 2007 20:43:21 GMT
On 8/2/07, Fabbris Pierluigi <pierluigi.fabbris@poste.it> wrote:

> javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/HelloWorld

> *My first servlet in directory classes is:*

Uh, well -- this *isn't* a servlet. I'm guessing that's the problem :-)
javax.servlet.Servlet is an interface -- your servlet needs to extend
it (actually HttpServlet in this case).

> class HelloWorld {
>       public static void main(String[] args)
>      {
>            System.out.println("Hello World!");
>      }
> }

See the examples packaged with Tomcat, and take a look at the
Servlet  Spec JavaDocs.

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message