You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Kenny G. Dubuisson, Jr." <kd...@kcmria.com> on 2002/09/27 15:04:29 UTC

Questions about Tomcat/Servlets

Hello all again.  I have 3 simple questions that I'd like to see if anyone
knows (please let me know if this is off topic or not).

1)  I'm working on teaching myself JSP/Servlets.  I wanted to know if when a
servlet is run the ".class" or the ".java" file is what got run.  So I
renamed one of Tomcat's example files ("HelloWorldExample.class") to a
"*.bak".  Once my test was done I renamed it back to the original file name.
Now it won't run.  Gives me a "Apache Tomcat/4.0.5 - HTTP Status 503 -
Servlet org.apache.catalina.INVOKER.HelloWorldExample is currently
unavailable" error.  I thought it maybe had something to do with the java
and class files having the same time stamp so I copied both from the
original Tomcat distribution and it still won't run.  Man I'm stuck on this
one...any ideas?

2) How do you get a ".class" file when you create a ".java" Servlet file?  I
was hoping that if I delete a ".class" file and the ".java" file still
exists, the ".class" file gets recreated/recompiled automatically by Tomcat.

3) What the heck does Jakarta mean?  I'm voting that it's a small Italian
cart used for transporting fish remains.

Thanks,
Kenny


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Questions about Servlets

Posted by "Patricio Vera S." <pa...@yahoo.es>.
    The servlet's user list is SERVLET-INTEREST@JAVA.SUN.COM.

Saludos,
Patricio Vera S.


----- Original Message -----
From: "Kenny G. Dubuisson, Jr." <kd...@kcmria.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, September 30, 2002 9:52 AM
Subject: Questions about Servlets


> Could anyone tell me where a good servlet coding / debugging list is?  I
> tried the one on java.sun.com but had no luck.  I'm trying to get an
example
> servlet that came with a book to compile and not sure where to get help.
I
> thought I'd ask here since this is related.
>
> Thanks all,
> Kenny
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Questions about Servlets

Posted by "Kenny G. Dubuisson, Jr." <kd...@kcmria.com>.
Could anyone tell me where a good servlet coding / debugging list is?  I
tried the one on java.sun.com but had no luck.  I'm trying to get an example
servlet that came with a book to compile and not sure where to get help.  I
thought I'd ask here since this is related.

Thanks all,
Kenny


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Questions about Tomcat/Servlets

Posted by David Mossakowski <dm...@Instinet.Com>.
Obviously in both cases only the .class file can be run.

What differs is when and how they get compiled.  Your servlet's source 
is not monitored ever but your JSP source is.  Therefore when the JSP 
source changes the container recompiles it and executes teh new .class 
file.  In the case of a servlet, changing source is not detected but (if 
configured) changed .class file is.  In order to have a new .class file 
you need to compile the .java file yourself.

Servlet .class file is no different from HelloWorld.class file.  It just 
requires some stuff on classpath in order to get compiled and it can't 
be run directly but is invoked by the servlet container.  You can write 
your own servlet container if you want too.  Make it an HTTP server. 
When a request for it is made (http://localhost/SillyServlet) have it 
load your servlet class by name (cast it to HttpServlet) and  execute 
its init() and then its doGet() method with the right parameters.

d.


Kenny G. Dubuisson, Jr. wrote:
> Hello all again.  I have 3 simple questions that I'd like to see if anyone
> knows (please let me know if this is off topic or not).
> 
> 1)  I'm working on teaching myself JSP/Servlets.  I wanted to know if when a
> servlet is run the ".class" or the ".java" file is what got run.  So I
> renamed one of Tomcat's example files ("HelloWorldExample.class") to a
> "*.bak".  Once my test was done I renamed it back to the original file name.
> Now it won't run.  Gives me a "Apache Tomcat/4.0.5 - HTTP Status 503 -
> Servlet org.apache.catalina.INVOKER.HelloWorldExample is currently
> unavailable" error.  I thought it maybe had something to do with the java
> and class files having the same time stamp so I copied both from the
> original Tomcat distribution and it still won't run.  Man I'm stuck on this
> one...any ideas?
> 
> 2) How do you get a ".class" file when you create a ".java" Servlet file?  I
> was hoping that if I delete a ".class" file and the ".java" file still
> exists, the ".class" file gets recreated/recompiled automatically by Tomcat.
> 
> 3) What the heck does Jakarta mean?  I'm voting that it's a small Italian
> cart used for transporting fish remains.
> 
> Thanks,
> Kenny
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 

-- 
David Mossakowski              dmoss@instinet.com
Instinet Corporation                 212.310.7275



*******************************************************************************
<<Disclaimer>>

This message is intended only for the use of the Addressee and 
may contain information that is PRIVILEGED and/or
CONFIDENTIAL or both.

This email is intended only for the personal and confidential use
of the recipient(s) named above.

If the reader of this email is not an intended recipient, you have
received this email in error and any review, dissemination,
distribution or copying is strictly prohibited.

If you have received this email in error, please notify the sender
immediately by return mail and permanently deleting the copy
you received.

Thank you.

*******************************************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>