You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ri...@libero.it on 2001/06/20 00:24:22 UTC
Has the servlet be compiled?
I have to compile the servlet?
I ha a simple servlet (Hello world)
what I have to do:
-complie and put it (file.class) in appropriate directory
-or just put it (file.java) in appropriate directory?
and how can I compile a servlet?
Thank you in advance, Mario.
Re: Has the servlet be compiled?
Posted by Daniel de Almeida Alvares <da...@techie.com>.
You must compile the file (.JAVA) and put the CLASS file on WEB-INF/classes
directory.
Regards
Daniel
_______________________
Daniel de Almeida Alvares
Santos - SP - Brasil
daniel.alvares@techie.com
----- Original Message -----
From: <ri...@libero.it>
To: <to...@jakarta.apache.org>
Sent: Tuesday, June 19, 2001 7:24 PM
Subject: Has the servlet be compiled?
> I have to compile the servlet?
> I ha a simple servlet (Hello world)
> what I have to do:
> -complie and put it (file.class) in appropriate directory
> -or just put it (file.java) in appropriate directory?
>
> and how can I compile a servlet?
> Thank you in advance, Mario.
Re: Has the servlet be compiled?
Posted by Dmitri Colebatch <di...@nuix.com.au>.
answer to your question: you need to compile it. servlet classes need to be
available to the application - compile them in to
$TOMCAT_HOME/webapps/myapp/WEB-INF/classes where myapp is the name of your
context. You will also need to change web.xml to define the servlet
(strictly speaking I think you can get away without doing this, but its good
practice).
this isn't really tomcat specific stuff though - you'd be well served by
getting your hands on a decent servlet book (the O'Rielly one is pretty good).
cheers
dim
On Wed, 20 Jun 2001 08:24, you wrote:
> I have to compile the servlet?
> I ha a simple servlet (Hello world)
> what I have to do:
> -complie and put it (file.class) in appropriate directory
> -or just put it (file.java) in appropriate directory?
>
> and how can I compile a servlet?
> Thank you in advance, Mario.
Re: Has the servlet be compiled?
Posted by Neil Conway <nc...@klamath.dyndns.org>.
On Wed, Jun 20, 2001 at 12:24:22AM +0200, rino.mail@libero.it wrote:
> I have to compile the servlet?
> I ha a simple servlet (Hello world)
> what I have to do:
> -complie and put it (file.class) in appropriate directory
Yes, compile it and put the bytecode in WEB-INF/classes
> -or just put it (file.java) in appropriate directory?
>
> and how can I compile a servlet?
With a Java compiler (javac, jikes, etc), just like regular Java code.
Cheers,
Neil
RE: Has the servlet be compiled?
Posted by Filip Hanik <ma...@filip.net>.
>-complie and put it (file.class) in appropriate directory
yes, put it in <your-web-app>/WEB-INF/classes
>and how can I compile a servlet?
javac.exe
I suggest you take a look at the examples and then read the servlet
specification. It will answer most of your questions
Filip
~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
filip@filip.net
www.filip.net
>-----Original Message-----
>From: rino.mail@libero.it [mailto:rino.mail@libero.it]
>Sent: Tuesday, June 19, 2001 3:24 PM
>To: tomcat-user@jakarta.apache.org
>Subject: Has the servlet be compiled?
>
>
>I have to compile the servlet?
>I ha a simple servlet (Hello world)
>what I have to do:
>-complie and put it (file.class) in appropriate directory
>-or just put it (file.java) in appropriate directory?
>
>and how can I compile a servlet?
>Thank you in advance, Mario.
>