Hello,

I have the exact same issue that was posted about 20 days ago. I haven't seen a 
response yet. Any ideas?

This is my servlet:

##################################
import javax.servlet.http.*;
import javax.servlet.ServletException;
import java.io.PrintWriter;
import java.io.IOException;

public class Test extends HttpServlet
{

public void init() throws ServletException
{
System.out.println( "loading ");
}
/**
* Returns an HTML form to the client prompting for
their name
* and e-mail address.
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException
{
//set MIME type for HTTP header
response.setContentType( "text/html ");

//get a handle to the output stream
PrintWriter out = response.getWriter();

out.println( " <HTML > <HEAD > ");
out.println( " <TITLE >Topic 3 Exercise 4 p. 14 Study
Guide </TITLE > ");
out.println( " </HEAD > ");
out.println( " <BODY > ");
out.println( " <H1 >Hello 2 changes </H1 > ");
out.println( " </BODY > </HTML > ");
out.close(); //always close the output stream
}
public void destroy()
{
System.out.println( "get rid of ");
}
}
#########################################
I compile it and place in ROOT/WEB-INF/classes

I run catalina.
it loads the servlet fine
I change some text in the servlet.... recompile

then in the console window I get:
#################################
WebappClassLoader: Resource
'/WEB-INF/classes/Test.class ' was modified; Date is now:
Wed Aug 20 13:24:30 CST 2003 Was: Wed Aug 20 13:21:45 CST
2003
get rid of
##################################
where 'get rid of ' the text in my destroy() method,
but no reloading.

in fact in the browser window when I do a reload I get:
HTTP Status 503 - Servlet
org.apache.catalina.INVOKER.Test is currently unavailable

and I can 't invoke any more servlets at all.

what am I doing wrong?

my servlet.xml file is as follows (relevant part):
######################################################
<!-- Define properties for each web application.
This is only needed
if you want to set non-default properties,
or have web application
document roots in places other than the
virtual host 's appBase
directory. -- >

<DefaultContext reloadable= "true "/ >

<!-- Tomcat Root Context -- >

<Context path= " " docBase= "ROOT " debug= "0 "
reloadable= "true " >
</Context >

########################################################

I really need to get tomcat to reload those servlets
otherwise it 's useless!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to